API Reference
@univerjs
@univerjs/engine-formula
interfaces
Ifunctionservice

@univerjs/engine-formula v0.4.2Docs


Interface: IFunctionService

Methods

getDescription()

getDescription(functionToken): Nullable<IFunctionInfo>

Parameters

ParameterType
functionTokenIFunctionNames

Returns

Nullable<IFunctionInfo>

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

ParameterType
functionTokenIFunctionNames

Returns

Nullable<BaseFunction>

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

ParameterType
functionTokenIFunctionNames

Returns

boolean

Defined in

packages/engine-formula/src/services/function.service.ts:53 (opens in a new tab)


hasExecutor()

hasExecutor(functionToken): boolean

Parameters

ParameterType
functionTokenIFunctionNames

Returns

boolean

Defined in

packages/engine-formula/src/services/function.service.ts:43 (opens in a new tab)


registerDescriptions()

registerDescriptions(...functions): IDisposable

Parameters

ParameterType
...functionsIFunctionInfo[]

Returns

IDisposable

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

ParameterType
...functionsBaseFunction[]

Returns

void

Defined in

packages/engine-formula/src/services/function.service.ts:27 (opens in a new tab)


unregisterDescriptions()

unregisterDescriptions(...functionTokens): void

Parameters

ParameterType
...functionTokensIFunctionNames[]

Returns

void

Defined in

packages/engine-formula/src/services/function.service.ts:55 (opens in a new tab)


unregisterExecutors()

unregisterExecutors(...functionTokens): void

Parameters

ParameterType
...functionTokensIFunctionNames[]

Returns

void

Defined in

packages/engine-formula/src/services/function.service.ts:45 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.