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


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

Parameters

row
The start row index.
column
The start column index.
rowCount
The number of rows in all areas.
columnCount
The number of columns in all areas.
formula
The formula to place in the specified cell.
Example
This example uses the SetFormula method.
gcSpreadSheet1.Sheets[0].SetFormula(0, 0, "D1+D2");
gcSpreadSheet1.Sheets[0].SetFormula(1, 1, 2, 2, "E1+E1");
listBox1.Items.Add(gcSpreadSheet1.Sheets[0].GetFormula(0, 0).ToString());
GcSpreadSheet1.Sheets(0).SetFormula(0, 0, "D1+D2")
GcSpreadSheet1.Sheets(0).SetFormula(1, 1, 2, 2, "E1+E1")
ListBox1.Items.Add(gcSpreadSheet1.Sheets(0).GetFormula(0, 0).ToString())
See Also

Reference

Worksheet Class
Worksheet Members
Overload List