Base class for formula functions.

ExcelCalcFunction

new ExcelCalcFunction(): ExcelCalcFunction

Returns ExcelCalcFunction

$t: Type

Maximum number of arguments required for the function

get maxArgs(): number

Returns number

Minimum number of arguments required for the function

get minArgs(): number

Returns number

Function name used to reference the function in a formula

get name(): string

Returns string

Determines whether the parameter at the specified index will accept an enumerable reference.

canParameterBeEnumerable(parameterIndex: number): boolean

Parameters

  • parameterIndex: number

    In 0-based index of the parameter.

Returns boolean

doesParameterAllowIntermediateResultArray

Section titled "doesParameterAllowIntermediateResultArray"

Determines whether the function accepts an intermediate result array created by evaluating a nested function on a per-element basis of an array or region parameter when a single value is expected.

doesParameterAllowIntermediateResultArray(parameterIndex: number, isCreatedFromRegionReference: boolean): boolean

Parameters

  • parameterIndex: number

    The 0-based index of parameter in which the intermediate array will be passed.

  • isCreatedFromRegionReference: boolean

    True if the value which will generate the intermediate result array is a region reference; False if it is a constant array.

Returns boolean

A helper method for extracting the [[ExcelCalcValue]] instances from the stack.

getArguments(numberStack: ExcelCalcNumberStack, argumentCount: number, skipEmptyValues: boolean): ExcelCalcValue[]

Parameters

  • numberStack: ExcelCalcNumberStack

    Number stack whose values should be popped.

  • argumentCount: number

    Number of items to pop/evaluate from the number stack

  • skipEmptyValues: boolean

    True to ignore values whose IsNull returns true; otherwise false to include empty items in the list.

Returns ExcelCalcValue[]

Evaluates the function against the arguments on the number stack.

performEvaluation(numberStack: ExcelCalcNumberStack, argumentCount: number): void

Parameters

  • numberStack: ExcelCalcNumberStack

    Formula number stack containing function arguments.

  • argumentCount: number

    Denotes the number of function arguments pushed onto the number stack.

Returns void