GrapeCity.Xaml.SpreadSheet.Data
SetFormula(Int32,Int32,String) Method
Example 


GrapeCity.Xaml.SpreadSheet.Data Namespace > Worksheet Class > SetFormula Method : SetFormula(Int32,Int32,String) Method
The row index.
The column index.
The formula to place in the specified cell.
Sets a formula in a specified cell in the specified sheet area.
Syntax
'Declaration
 
Public Overloads Sub SetFormula( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal formula As String _
) 
'Usage
 
Dim instance As Worksheet
Dim row As Integer
Dim column As Integer
Dim formula As String
 
instance.SetFormula(row, column, formula)
public void SetFormula( 
   int row,
   int column,
   string formula
)

Parameters

row
The row index.
column
The column index.
formula
The formula to place in the specified cell.
Example
This example uses the SetFormula method.
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

Worksheet Class
Worksheet Members
Overload List