GrapeCity.Xaml.Excel
SetCell Method


GrapeCity.Excel Namespace > IExcelReader Interface : SetCell Method
The zero based sheet index used to locate the ExcelWorksheet instance
The zero based cell row index
The zero based cell column index
The value for the cell
The cell type for the cell
The format index for the cell
The formula for the cell
A all-in-one method which will set value, cell type, format index and formula for the specified cell.
Syntax
'Declaration
 
Function SetCell( _
   ByVal sheet As Short, _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal value As Object, _
   ByVal type As CellType, _
   ByVal formatIndex As Integer, _
   ByVal cellFormula As IExcelFormula _
) As Boolean
'Usage
 
Dim instance As IExcelReader
Dim sheet As Short
Dim row As Integer
Dim column As Integer
Dim value As Object
Dim type As CellType
Dim formatIndex As Integer
Dim cellFormula As IExcelFormula
Dim value As Boolean
 
value = instance.SetCell(sheet, row, column, value, type, formatIndex, cellFormula)
bool SetCell( 
   short sheet,
   int row,
   int column,
   object value,
   CellType type,
   int formatIndex,
   IExcelFormula cellFormula
)

Parameters

sheet
The zero based sheet index used to locate the ExcelWorksheet instance
row
The zero based cell row index
column
The zero based cell column index
value
The value for the cell
type
The cell type for the cell
formatIndex
The format index for the cell
cellFormula
The formula for the cell

Return Value

true If the cell is a valid cell. otherwise, false
Remarks
This method is used for performance consideration. It will set all cell related properties at once. It will only set the value to the cell if the passed value is not null, only set the formula to the cell if the passed formula is not null or empty.
See Also

Reference

IExcelReader Interface
IExcelReader Members