Spread Silverlight Documentation
Formula Property (Cell)
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > Cell Class : Formula Property
Gets or sets the formula in a cell.
Syntax
'Declaration
 
<System.ComponentModel.DefaultValueAttribute()>
Public Property Formula As System.String
'Usage
 
Dim instance As Cell
Dim value As System.String
 
instance.Formula = value
 
value = instance.Formula
[System.ComponentModel.DefaultValue()]
public System.string Formula {get; set;}

Property Value

The formula in the cell. The default value is empty.
Example
This example sets the Formula property.
gcSpreadSheet1.Sheets[0].SetValue(0, 0, 1);
gcSpreadSheet1.Sheets[0].SetValue(0, 1, 2);
gcSpreadSheet1.Sheets[0].SetValue(1, 0, 10);
gcSpreadSheet1.Sheets[0].Cells[1, 1].Formula = "sum(A1:C1)";
gcSpreadSheet1.Sheets[0].SetFormula(3, 1, "A1+A2");
gcSpreadSheet1.Sheets(0).SetValue(0, 0, 1)
gcSpreadSheet1.Sheets(0).SetValue(0, 1, 2)
gcSpreadSheet1.Sheets(0).SetValue(1, 0, 10)
gcSpreadSheet1.Sheets(0).Cells(1, 1).Formula = "sum(A1:C1)"
gcSpreadSheet1.Sheets(0).SetFormula(3, 1, "A1+A2")
See Also

Reference

Cell Class
Cell Members