ExcelFile.GetCellValue Method
Overloads
- ExcelFile.GetCellValue(String)
- ExcelFile.GetCellValue(Int32, Int32)
- ExcelFile.GetCellValue(Int32, Int32, Int32)
- ExcelFile.GetCellValue(Int32, Int32, Int32, Int32)
ExcelFile.GetCellValue(String)
Reads a cell value given a cell reference. While this is normally not needed because you can use TCellAddress to convert the cell reference to row and column and then use a standard GetCellValue call, it can be handy if you know the cell reference (like AX42) and want a fast way to get the value of the cell.
Syntax
Namespace: FlexCel.Core
public Object GetCellValue(String cellRef)
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
cellRef | String | Cell reference in A1 notation. Something like A3, or Sheet1!$B$5 can be used here. |
See also
ExcelFile.GetCellValue(Int32, Int32)
Reads a Cell Value.
Remarks
This method will return the real value stored on the cell. For example, if you have "1.3" formatted as "1.30", GetCellValue will return the number 1.3. To get a string with the formatted value, see GetStringFromCell(Int32, Int32)
Syntax
Namespace: FlexCel.Core
public Object GetCellValue(Int32 row, Int32 col)
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
row | Int32 | Row, 1 based. | |
col | Int32 | Column, 1 based. |
Returns
Object with the value. It can be null, a double, a string, a boolean, a TFormula, a TFlxFormulaErrorValue or TRichString. Dates are returned as doubles. See the Reading Files demo to know how to use each type of the objects returned.
See also
ExcelFile.GetCellValue(Int32, Int32, Int32)
Reads a Cell Value and Format.
Syntax
Namespace: FlexCel.Core
public abstract Object GetCellValue(Int32 row, Int32 col, ref Int32 XF)
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
row | Int32 | Row, 1 based. | |
col | Int32 | Column, 1 based. | |
ref | XF | Int32 | XF format. |
Returns
Object with the value. It can be null, a double, a string, a boolean, a TFormula, a TFlxFormulaErrorValue or a TRichString. Dates are returned as doubles. See the Reading Files demo to know how to use each type of the objects returned.
See also
ExcelFile.GetCellValue(Int32, Int32, Int32, Int32)
Reads a Cell Value and Format from a sheet that is not the active sheet.
Syntax
Namespace: FlexCel.Core
public abstract Object GetCellValue(Int32 sheet, Int32 row, Int32 col, ref Int32 XF)
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
sheet | Int32 | Sheet where is the cell you want to get the value. | |
row | Int32 | Row, 1 based. | |
col | Int32 | Column, 1 based. | |
ref | XF | Int32 | XF format. |
Returns
Object with the value. It can be null, a double, a string, a boolean, a TFormula, a TFlxFormulaErrorValue or a TRichString. Dates are returned as doubles. See the Reading Files demo to know how to use each type of the objects returned.