Base class for formula functions.

Hierarchy

Hierarchy

  • Base
    • ExcelCalcFunction

Constructors

  • Returns ExcelCalcFunction

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get maxArgs(): number
  • Maximum number of arguments required for the function

    Returns number

  • get minArgs(): number
  • Minimum number of arguments required for the function

    Returns number

  • get name(): string
  • Function name used to reference the function in a formula

    Returns string

Methods

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

    Parameters

    • parameterIndex: number

      In 0-based index of the parameter.

    Returns boolean

  • 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.

    An intermediate result array will be generated when multiple values are specified where a single value is expected. For example, the following formula will generate the value 15: =SUM(10/{1,2}). This is because "10/{1,2}" will result in an intermediate result array of {10/1,10/2}, or {10,5}. Then each element is summed up to result in the value 15. However, the SUM function does not allow intermediate result arrays for region references. So a function such as =SUM(10/D6:E7) will result in a #VALUE! error. Unlike the SUM function, the LOOKUP function allows intermediate result arrays from region references. So a formula like LOOKUP(10,D6:E7*2) will return a correct result if the value 10 can be found in the following intermediate result array when using the normal LOOKUP function logic: {D6*2,E6*2; D7*2,E7*2}. Therefore, SUM would return True from this method only when 'isCreatedFromRegionReference' is False and LOOKUP would return True from this method always (for a 'parameterIndex' value of 1 in this example).

    Note: if this function is being called in an array formula, the restrictions are relaxed in the following way: if the function supports intermediate result arrays created from constant array, it will also support intermediate result arrays created from region references, so the 'isCreatedFromRegionReference' value will always be passed in as False.

    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

  • Parameters

    • other: any

    Returns boolean

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

    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[]

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

    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.

    • skipHiddenCells: boolean

      True to ignore values from hidden cells.

    Returns ExcelCalcValue[]

  • Returns number

  • Returns Base

  • Evaluates the function against the arguments on the number stack.

    Parameters

    • numberStack: ExcelCalcNumberStack

      Formula number stack containing function arguments.

    • argumentCount: number

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

    Returns void

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns boolean

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns boolean