Spread WPF Documentation
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 System.Short, _
   ByVal row As System.Integer, _
   ByVal column As System.Integer, _
   ByVal value As System.Object, _
   ByVal type As CellType, _
   ByVal formatIndex As System.Integer, _
   ByVal cellFormula As IExcelFormula _
) As System.Boolean
'Usage
 
Dim instance As IExcelReader
Dim sheet As System.Short
Dim row As System.Integer
Dim column As System.Integer
Dim value As System.Object
Dim type As CellType
Dim formatIndex As System.Integer
Dim cellFormula As IExcelFormula
Dim value As System.Boolean
 
value = instance.SetCell(sheet, row, column, value, type, formatIndex, cellFormula)
System.bool SetCell( 
   System.short sheet,
   System.int row,
   System.int column,
   System.object value,
   CellType type,
   System.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