Spread.Sheets Documentation
getFormulaInformation Method
The row index.
The column index.
Gets the formula 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

Returns the formula information about the cell.
object.hasFormula {boolean} Indicates whether there is a formula in the cell.
object.formula {string} The formula string.
object.isArrayFormula {boolean} Indicates whether the formula is an array formula.
object.baseRange {GC.Spread.Sheets.Range} The range applied to the array formula.
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

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.