@univerjs-pro/engine-formula v0.5.4
Interface: IFunctionService
Defined in: submodules/univer/packages/engine-formula/src/services/function.service.ts:23
Methods
getDescription()
getDescription(functionToken): Nullable<IFunctionInfo>
Defined in: submodules/univer/packages/engine-formula/src/services/function.service.ts:51
Parameters
Parameter | Type |
---|---|
functionToken | IFunctionNames |
Returns
getDescriptions()
getDescriptions(): Map<IFunctionNames, IFunctionInfo>
Defined in: submodules/univer/packages/engine-formula/src/services/function.service.ts:49
Returns
Map
<IFunctionNames
, IFunctionInfo
>
getExecutor()
getExecutor(functionToken): Nullable<BaseFunction>
Defined in: submodules/univer/packages/engine-formula/src/services/function.service.ts:41
Obtain the operator of the function to reuse the calculation logic. The argument type accepted by the function is: FunctionVariantType. For instance, the sum formula capability is needed for the statistics bar. You can obtain the calculation result by using const sum = formulaService.getExecutor(FUNCTION_NAMES_MATH.SUM); sum.calculate(new RangeReferenceObject(range, sheetId, unitId), ref2, re3).
Parameters
Parameter | Type |
---|---|
functionToken | IFunctionNames |
Returns
getExecutors()
getExecutors(): Map<IFunctionNames, BaseFunction>
Defined in: submodules/univer/packages/engine-formula/src/services/function.service.ts:29
Returns
Map
<IFunctionNames
, BaseFunction
>
hasDescription()
hasDescription(functionToken): boolean
Defined in: submodules/univer/packages/engine-formula/src/services/function.service.ts:53
Parameters
Parameter | Type |
---|---|
functionToken | IFunctionNames |
Returns
boolean
hasExecutor()
hasExecutor(functionToken): boolean
Defined in: submodules/univer/packages/engine-formula/src/services/function.service.ts:43
Parameters
Parameter | Type |
---|---|
functionToken | IFunctionNames |
Returns
boolean
registerDescriptions()
registerDescriptions(...functions): IDisposable
Defined in: submodules/univer/packages/engine-formula/src/services/function.service.ts:47
Parameters
Parameter | Type |
---|---|
…functions | IFunctionInfo [] |
Returns
registerExecutors()
registerExecutors(...functions): void
Defined in: submodules/univer/packages/engine-formula/src/services/function.service.ts:27
Use register to register a function, new CustomFunction(inject, name)
Parameters
Parameter | Type |
---|---|
…functions | BaseFunction [] |
Returns
void
unregisterDescriptions()
unregisterDescriptions(...functionTokens): void
Defined in: submodules/univer/packages/engine-formula/src/services/function.service.ts:55
Parameters
Parameter | Type |
---|---|
…functionTokens | IFunctionNames [] |
Returns
void
unregisterExecutors()
unregisterExecutors(...functionTokens): void
Defined in: submodules/univer/packages/engine-formula/src/services/function.service.ts:45
Parameters
Parameter | Type |
---|---|
…functionTokens | IFunctionNames [] |
Returns
void