Spread.Sheets Documentation
getFormulaInformation Method
GC.Spread.Sheets Namespace > Worksheet type : getFormulaInformation Method
The row index.
The column index.
Gets the formula detail information in the specified cell in this sheet.
Syntax
var instance = new GC.Spread.Sheets.Worksheet(name);
var value; // Type: object
value = instance.getFormulaInformation(row, col);
function getFormulaInformation( 
   row : number,
   col : number
) : object;

Parameters

row
The row index.
col
The column index.

Return Value

formulaInfo - Returns the formula information about the cell. formulaInfo.hasFormula {boolean} Indicates whether there is a formula in the cell. formulaInfo.isArrayFormula {boolean} Indicates whether the formula is an array formula. formulaInfo.formula {string} The formula string. formulaInfo.formulaWithCulture {string} The formula string with culture.
Example
The following examples use the getFormulaInformation method.
activeSheet.setValue(0,0,1);
activeSheet.setValue(0,1,2);
activeSheet.setValue(0,2,10);
activeSheet.getCell(1,1).formula("=SUM(A1:C1)");
var test = activeSheet.getFormulaInformation(1,1, GC.Spread.Sheets.SheetArea.viewport);
alert(test.formula);
activeSheet.setValue(0, 2, 3);
activeSheet.setFormula(1,1,"C1+D1",GC.Spread.Sheets.SheetArea.viewport);
var information = activeSheet.getFormulaInformation(1, 1);
alert(information.formula);
activeSheet.setValue(0, 2, 3);
activeSheet.setFormula(1,1,"C1+D1",GC.Spread.Sheets.SheetArea.viewport);
var information = activeSheet.getFormulaInformation(1, 1);
alert(information.isArrayFormula);
See Also

Reference

Worksheet type