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