GrapeCity.Xaml.SpreadSheet.Data
Formula Property (Cell)
Example 


GrapeCity.Xaml.SpreadSheet.Data Namespace > Cell Class : Formula Property
Gets or sets the formula in a cell.
Syntax
'Declaration
 
<DefaultValueAttribute()>
Public Property Formula As String
'Usage
 
Dim instance As Cell
Dim value As String
 
instance.Formula = value
 
value = instance.Formula
[DefaultValue()]
public 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