Spread for ASP.NET 7.0 Product Documentation
SetFormula
See Also Support Options
Spread for ASP.NET 7.0 Product Documentation > Client-Side Scripting Reference > Scripting Members > Methods > SetFormula

Glossary Item Box

Sets the formula in a cell at the specified row and column.

Syntax

[JavaScript]

FpSpread1.SetFormula(row,column,value);

Parameters

row
Integer, row index of cell
column
Integer, column index of cell
value
String, the formula to put in the cell

Return Type

None

Remarks

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 (=).

Example

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 language=javascript>
   function setEquation() {
        FpSpread1.SetFormula(5,3,"= A1 + B1 / C1");
   }
</SCRIPT>

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.