In Spread.Sheets, you can create a formula that uses the content of other cells and displays the results in another cell. You can also use various functions to easily calculate complex formulas.
Spread.Sheets provides a large variety of functions, from basic functions that are commonly used — like SUM — to advanced functions like MAX:
//Returns the sum of the values contained in the range A1:C5.
//Returns the largest value in the range A1:C5.
You can input the SUM function from the above code directly into a cell, or you can use the setFormula method to apply the formula.
var spread = GC.Spread.Sheets.findControl(document.getElementById('ss'));
var sheet = spread.getActiveSheet();
// set some values to C4:C7
sheet.setFormula(8, 2, '=MAX(C4:C7)');
Note: Spread.Sheets provides support for the following Excel basic functions:
The red functions in the table are Excel 2013 through 2016 functions that are now supported in Spread.Sheets.