XlsFile.SetCellValue Method
Overloads
- XlsFile.SetCellValue(Int32, Int32, Object, Int32)
- XlsFile.SetCellValue(Int32, Int32, Int32, Object, Int32)
XlsFile.SetCellValue(Int32, Int32, Object, Int32)
Sets the value and format on a cell.
Remarks
This method will enter the datatype of the object you pass to it. For example, if you set value="1" the string "1" will be entered on the cell. To convert a string to the best representation (on this case a number), use ExcelFile.SetCellFromString(Int32, Int32, TRichString, Int32) To enter a HTML formatted string, use ExcelFile.SetCellFromHtml(Int32, Int32, String, Int32)
Syntax
Namespace: FlexCel.XlsAdapter
public override void SetCellValue(Int32 row, Int32 col, Object value, Int32 XF)
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
row | Int32 | Row, 1 based. | |
col | Int32 | Column, 1 based. | |
value | Object | Value to set. | |
XF | Int32 | Format to Set. You normally get this number with ExcelFile.AddFormat function. Use -1 to keep format unchanged. |
See also
XlsFile.SetCellValue(Int32, Int32, Int32, Object, Int32)
Sets the value on a cell.
Remarks
This method will enter the datatype of the object you pass to it. For example, if you set value="1" the string "1" will be entered on the cell. To convert a string to the best representation (on this case a number), use ExcelFile.SetCellFromString(Int32, Int32, TRichString, Int32). To enter a HTML formatted string, use ExcelFile.SetCellFromHtml(Int32, Int32, String, Int32)
Syntax
Namespace: FlexCel.XlsAdapter
public override void SetCellValue(Int32 sheet, Int32 row, Int32 col, Object value, Int32 XF)
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
sheet | Int32 | Sheet number, 1 based | |
row | Int32 | Row, 1 based. | |
col | Int32 | Column, 1 based. | |
value | Object | Value to set. | |
XF | Int32 | Format to Set. You normally get this number with ExcelFile.AddFormat function. Use -1 to keep format unchanged. |