Base class for formula functions.
Constructors
Section titled "Constructors"ExcelCalcFunction
new ExcelCalcFunction(): ExcelCalcFunction Returns ExcelCalcFunction
Properties
Section titled "Properties"$t: Type Accessors
Section titled "Accessors"maxArgs
Section titled "maxArgs"Maximum number of arguments required for the function
get maxArgs(): number Returns number
minArgs
Section titled "minArgs"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
Methods
Section titled "Methods"canParameterBeEnumerable
Section titled "canParameterBeEnumerable"Determines whether the parameter at the specified index will accept an enumerable reference.
canParameterBeEnumerable(parameterIndex: number): boolean Parameters
- parameterIndex:
numberIn 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:
numberThe 0-based index of parameter in which the intermediate array will be passed.
- isCreatedFromRegionReference:
booleanTrue if the value which will generate the intermediate result array is a region reference; False if it is a constant array.
Returns boolean
getArguments
Section titled "getArguments"A helper method for extracting the [[ExcelCalcValue]] instances from the stack.
getArguments(numberStack: ExcelCalcNumberStack, argumentCount: number, skipEmptyValues: boolean): ExcelCalcValue[] Parameters
- numberStack:
ExcelCalcNumberStackNumber stack whose values should be popped.
- argumentCount:
numberNumber of items to pop/evaluate from the number stack
- skipEmptyValues:
booleanTrue to ignore values whose IsNull returns true; otherwise false to include empty items in the list.
Returns ExcelCalcValue[]
performEvaluation
Section titled "performEvaluation"Evaluates the function against the arguments on the number stack.
performEvaluation(numberStack: ExcelCalcNumberStack, argumentCount: number): void Parameters
- numberStack:
ExcelCalcNumberStackFormula number stack containing function arguments.
- argumentCount:
numberDenotes the number of function arguments pushed onto the number stack.