@univerjs/engine-formula v0.4.2 • Docs
Interface: IFunctionService
Methods
getDescription()
getDescription(functionToken): Nullable<IFunctionInfo>
Parameters
Parameter | Type |
---|---|
functionToken | IFunctionNames |
Returns
Defined in
packages/engine-formula/src/services/function.service.ts:51 (opens in a new tab)
getDescriptions()
getDescriptions(): Map<IFunctionNames, IFunctionInfo>
Returns
Map
<IFunctionNames
, IFunctionInfo
>
Defined in
packages/engine-formula/src/services/function.service.ts:49 (opens in a new tab)
getExecutor()
getExecutor(functionToken): Nullable<BaseFunction>
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
Defined in
packages/engine-formula/src/services/function.service.ts:41 (opens in a new tab)
getExecutors()
getExecutors(): Map<IFunctionNames, BaseFunction>
Returns
Map
<IFunctionNames
, BaseFunction
>
Defined in
packages/engine-formula/src/services/function.service.ts:29 (opens in a new tab)
hasDescription()
hasDescription(functionToken): boolean
Parameters
Parameter | Type |
---|---|
functionToken | IFunctionNames |
Returns
boolean
Defined in
packages/engine-formula/src/services/function.service.ts:53 (opens in a new tab)
hasExecutor()
hasExecutor(functionToken): boolean
Parameters
Parameter | Type |
---|---|
functionToken | IFunctionNames |
Returns
boolean
Defined in
packages/engine-formula/src/services/function.service.ts:43 (opens in a new tab)
registerDescriptions()
registerDescriptions(...functions): IDisposable
Parameters
Parameter | Type |
---|---|
...functions | IFunctionInfo [] |
Returns
Defined in
packages/engine-formula/src/services/function.service.ts:47 (opens in a new tab)
registerExecutors()
registerExecutors(...functions): void
Use register to register a function, new CustomFunction(inject, name)
Parameters
Parameter | Type |
---|---|
...functions | BaseFunction [] |
Returns
void
Defined in
packages/engine-formula/src/services/function.service.ts:27 (opens in a new tab)
unregisterDescriptions()
unregisterDescriptions(...functionTokens): void
Parameters
Parameter | Type |
---|---|
...functionTokens | IFunctionNames [] |
Returns
void
Defined in
packages/engine-formula/src/services/function.service.ts:55 (opens in a new tab)
unregisterExecutors()
unregisterExecutors(...functionTokens): void
Parameters
Parameter | Type |
---|---|
...functionTokens | IFunctionNames [] |
Returns
void
Defined in
packages/engine-formula/src/services/function.service.ts:45 (opens in a new tab)