Spread for ASP.NET 9.0 Product Documentation > Client-Side Scripting Reference > Scripting Members > Methods > SetFormula |
Sets the formula in a cell at the specified row and column.
[JavaScript]
FpSpread1.SetFormula(row,column,value);
None
Both row and column indexes must be integer values and must be valid. The formula is parsed and evaluated when the data is posted back to the server. This method does not cause a postback to occur. For a list of the operators and functions that appear in formulas, refer to the Formula Reference. Be sure to start the formula with an equals sign (=).
This is a sample that contains the method. On the client side, the script that contains the method would look like this:
JavaScript |
Copy Code
|
---|---|
<script type="text/javascript"> function setEquation() { FpSpread1.SetFormula(5,3,"= A1 + B1 / C1"); } </script> |