CalculationData
CalculationData class
Represents the required data when calculating one function, such as function name, parameters, …etc.
class CalculationData;
Remarks
All objects provided by this class are for “read” purpose only. User should not change any data in the Workbook during the formula calculation process, Otherwise unexpected result or Exception may be caused.
Methods
Method | Description |
---|---|
getWorkbook() | Gets the Workbook object where the function is in. |
getWorksheet() | Gets the Worksheet object where the function is in. |
getCellRow() | Gets the row index of the cell where the function is in. |
getCellColumn() | Gets the column index of the cell where the function is in. |
getCell() | Gets the Cell object where the function is in. |
getFunctionName() | Gets the function name to be calculated. |
getParamCount() | Gets the count of parameters |
getParamText(number) | Gets the literal text of the parameter at given index. |
getWorkbook()
Gets the Workbook object where the function is in.
getWorkbook() : Workbook;
Returns
getWorksheet()
Gets the Worksheet object where the function is in.
getWorksheet() : Worksheet;
Returns
getCellRow()
Gets the row index of the cell where the function is in.
getCellRow() : number;
getCellColumn()
Gets the column index of the cell where the function is in.
getCellColumn() : number;
getCell()
Gets the Cell object where the function is in.
getCell() : Cell;
Returns
Remarks
When calculating a formula without setting it to a cell, such as by [Worksheet.CalculateFormula(string, CalculationOptions)](../worksheet.calculateformula(string, calculationoptions)/), the formula will be calculated just like it has been set to cell A1, so both CellRow and CellRow are 0. However, cell A1 in the worksheet may has not been instantiated. So for such kind of situation this property will be null.
getFunctionName()
Gets the function name to be calculated.
getFunctionName() : string;
getParamCount()
Gets the count of parameters
getParamCount() : number;
getParamText(number)
Gets the literal text of the parameter at given index.
getParamText(index: number) : string;
Parameters:
Parameter | Type | Description |
---|---|---|
index | number | index of the parameter(0 based) |
Returns
literal text of the parameter