calculate

allows performing math operations in cells

void calculate(string math, [string page] );
mathstringthe operation to be calculated
pagestringoptional, the sheet to call the math operation from

Example

// sums up the value of the cell A1 from the current sheet
// and the value of the cell A1 from Sheet1
$$("ssheet").calculate("SUM(A1, Sheet1!A1)");
 
// sums up the values of cells A1 and B1 from Sheet2
$$("ssheet").calculate("SUM(A1, B1)", "Sheet2")

Related samples

Details

You can omit the "=" sign in the beginning of the calculated expression: SUM(A1, Sheet1!A1) works the same as =SUM(A1, Sheet1!A1).

Back to top
Join Our Forum
We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.