TExcelFile.GetCellValue Method
Overloads
TExcelFile.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
Unit: FlexCel.Core
function TExcelFile.GetCellValue(const cellRef: string): TCellValue; overload;
Parameters
<-> |
Parameter |
Type |
Description |
const |
cellRef |
string |
Cell reference in A1 notation. Something like A3, or Sheet1!$B$5 can be used here. |
See also
TExcelFile.GetCellValue(Integer, Integer)
Reads a Cell Value.
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(Integer, Integer)
Syntax
Unit: FlexCel.Core
function TExcelFile.GetCellValue(const row: Integer; const col: Integer): TCellValue; overload;
Parameters
<-> |
Parameter |
Type |
Description |
const |
row |
Integer |
Row, 1 based. |
const |
col |
Integer |
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
TExcelFile.GetCellValue(Integer, Integer, Integer)
Reads a Cell Value and Format.
Syntax
Unit: FlexCel.Core
function TExcelFile.GetCellValue(const row: Integer; const col: Integer; var XF: Integer): TCellValue; overload; virtual; abstract;
Parameters
<-> |
Parameter |
Type |
Description |
const |
row |
Integer |
Row, 1 based. |
const |
col |
Integer |
Column, 1 based. |
var |
XF |
Integer |
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
TExcelFile.GetCellValue(Integer, Integer, Integer, Integer)
Reads a Cell Value and Format from a sheet that is not the active sheet.
Syntax
Unit: FlexCel.Core
function TExcelFile.GetCellValue(const sheet: Integer; const row: Integer; const col: Integer; var XF: Integer): TCellValue; overload; virtual; abstract;
Parameters
<-> |
Parameter |
Type |
Description |
const |
sheet |
Integer |
Sheet where is the cell you want to get the value. |
const |
row |
Integer |
Row, 1 based. |
const |
col |
Integer |
Column, 1 based. |
var |
XF |
Integer |
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