Worksheet.CalculateArrayFormula

CalculateArrayFormula(string, CalculationOptions)

Calculates a formula as array formula.

public object[][] CalculateArrayFormula(string formula, CalculationOptions opts)
ParameterTypeDescription
formulaStringFormula to be calculated.
optsCalculationOptionsOptions for calculating formula

See Also


CalculateArrayFormula(string, CalculationOptions, int, int)

Calculates a formula as array formula.

public object[][] CalculateArrayFormula(string formula, CalculationOptions opts, int maxRowCount, 
    int maxColumnCount)
ParameterTypeDescription
formulaStringFormula to be calculated.
optsCalculationOptionsOptions for calculating formula
maxRowCountInt32the maximum row count of resultant data. If it is non-positive or greater than the actual row count, then actual row count will be used.
maxColumnCountInt32the maximum column count of resultant data. If it is non-positive or greater than the actual row count, then actual column count will be used.

Return Value

Calculated formula result.

Remarks

The formula will be taken as dynamic array formula to calculate the dimension and result. User specified maximum dimension is used for cases that the calculated result is large data set (for example, the calculated result may correspond to a whole row or column data) but user does not need so large an array according to business requirement or for performance consideration.

See Also


CalculateArrayFormula(string, FormulaParseOptions, CalculationOptions, int, int, int, int, CalculationData)

Calculates a formula as array formula.

public object[][] CalculateArrayFormula(string formula, FormulaParseOptions pOpts, 
    CalculationOptions cOpts, int baseCellRow, int baseCellColumn, int maxRowCount, 
    int maxColumnCount, CalculationData calculationData)
ParameterTypeDescription
formulaStringFormula to be calculated.
pOptsFormulaParseOptionsOptions for parsing formula
cOptsCalculationOptionsOptions for calculating formula
baseCellRowInt32The row index of the base cell.
baseCellColumnInt32The column index of the base cell.
maxRowCountInt32The maximum row count of resultant data. If it is non-positive or greater than the actual row count, then actual row count will be used.
maxColumnCountInt32The maximum column count of resultant data. If it is non-positive or greater than the actual row count, then actual column count will be used.
calculationDataCalculationDataThe calculation data. It is used for the situation that user needs to calculate some static formulas when implementing custom calculation engine. For such kind of situation, user needs to specify it with the calculation data provided for Calculate.

Return Value

Calculated formula result.

Remarks

The formula will be taken as dynamic array formula to calculate the dimension and result. User specified maximum dimension is used for cases that the calculated result is large data set (for example, the calculated result may correspond to a whole row or column data) but user does not need so large an array according to business requirement or for performance consideration.

See Also