SpreadJS Documentation
Using Built-In Formulas

You can use built-in formulas in cells. Use the formula method or setFormula method to add formulas. You can also specify the reference style with the referenceStyle method.

Using Code

This example sets the referenceStyle method.

JavaScript
Copy Code
spread.referenceStyle(GcSpread.Sheets.ReferenceStyle.R1C1);
//spread.referenceStyle(GcSpread.Sheets.ReferenceStyle.A1);

Using Code

This example uses the formula method.

JavaScript
Copy Code
activeSheet.setValue(0,0,1);
activeSheet.setValue(0,1,2);
activeSheet.setValue(0,2,10);
activeSheet.getCell(1,1).formula("=SUM(A1:C1)");
See Also

Formula Reference

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.