ig.excel.ExcelCalcFunction

Base class for formula functions.

Dependencies

jquery-1.4.4.js
infragistics.util.js
The current widget has no options.
The current widget has no events.
  • ig.excel.ExcelCalcFunction
    Constructor

    new $.ig.excel.ExcelCalcFunction( );

    Initializes a new ExcelCalcFunction

  • canParameterBeEnumerable

    .canParameterBeEnumerable( parameterIndex:number );
    Return Type:
    boolean
    Return Type Description:
    True if the parameter at the specified index can accept enumerable references; False otherwise or if the parameter is out of range for this function.

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

    • parameterIndex
    • Type:number
    • In 0-based index of the parameter.
  • doesParameterAllowIntermediateResultArray

    .doesParameterAllowIntermediateResultArray( parameterIndex:number, isCreatedFromRegionReference:boolean );
    Return Type:
    boolean
    Return Type Description:
    True to allow intermediate result arrays for the specified parameter; False otherwise.

    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.

    • parameterIndex
    • Type:number
    • The 0-based index of parameter in which the intermediate array will be passed.
    • isCreatedFromRegionReference
    • Type:boolean
    • True if the value which will generate the intermediate result array is a region reference; False if it is a constant array.

    Remarks

    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.

  • evaluate

    .evaluate( numberStack:ig.excel.ExcelCalcNumberStack, argumentCount:number );
    Return Type:
    ig.excel.ExcelCalcValue
    Return Type Description:
    An ExcelCalcValue that represents the result of the function evaluation.

    Evaluates the function against the arguments on the number stack.

    • numberStack
    • Type:ig.excel.ExcelCalcNumberStack
    • Formula number stack containing function arguments.
    • argumentCount
    • Type:number
    • Denotes the number of function arguments pushed onto the number stack.
  • getArguments

    .getArguments( numberStack:ig.excel.ExcelCalcNumberStack, argumentCount:number, skipEmptyValues:boolean );
    Return Type:
    ig.excel.ExcelCalcValue[]
    Return Type Description:
    An array of ExcelCalcValue instances removed from the number stack.

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

    • numberStack
    • Type:ig.excel.ExcelCalcNumberStack
    • Number stack whose values should be popped.
    • argumentCount
    • Type:number
    • Number of items to pop/evaluate from the number stack
    • skipEmptyValues
    • Type:boolean
    • True to ignore values whose IsNull returns true; otherwise false to include empty items in the list.
  • getArguments

    .getArguments( numberStack:ig.excel.ExcelCalcNumberStack, argumentCount:number, skipEmptyValues:boolean, skipHiddenCells:boolean );
    Return Type:
    ig.excel.ExcelCalcValue[]
    Return Type Description:
    An array of UltraCalcValue instances removed from the number stack.

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

    • numberStack
    • Type:ig.excel.ExcelCalcNumberStack
    • Number stack whose values should be popped.
    • argumentCount
    • Type:number
    • Number of items to pop/evaluate from the number stack
    • skipEmptyValues
    • Type:boolean
    • True to ignore values whose IsNull returns true; otherwise false to include empty items in the list.
    • skipHiddenCells
    • Type:boolean
    • True to ignore values from hidden cells.
  • maxArgs

    .maxArgs( );

    Maximum number of arguments required for the function

  • minArgs

    .minArgs( );

    Minimum number of arguments required for the function

  • name

    .name( );

    Function name used to reference the function in a formula

  • performEvaluation

    .performEvaluation( numberStack:ig.excel.ExcelCalcNumberStack, argumentCount:number );

    Evaluates the function against the arguments on the number stack.

    • numberStack
    • Type:ig.excel.ExcelCalcNumberStack
    • Formula number stack containing function arguments.
    • argumentCount
    • Type:number
    • Denotes the number of function arguments pushed onto the number stack.

Copyright © 1996 - 2024 Infragistics, Inc. All rights reserved.