Table of Contents

TExcelFile.GetCellValueIndexed Method

Overloads

TExcelFile.GetCellValueIndexed(Integer, Integer, Integer)

Reads a Cell Value and Format, using a column index for faster access. Normal GetCellValue(row, col) has to search for the column on a sorted list. If you are looping from 1 to ColCountInRow(Integer) this method is faster.

Syntax

Unit: FlexCel.Core

function TExcelFile.GetCellValueIndexed(const row: Integer; const colIndex: Integer; var XF: Integer): TCellValue; overload;

Parameters

<-> Parameter Type Description
const row Integer Row, 1 based.
const colIndex Integer Column index, 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.GetCellValueIndexed(Integer, Integer, Integer, Integer)

Reads a Cell Value and Format, using a column index for faster access. Normal GetCellValue(row, col) has to search for the column on a sorted list. If you are looping from 1 to ColCountInRow(Integer) this method is faster.

Syntax

Unit: FlexCel.Core

function TExcelFile.GetCellValueIndexed(const sheet: Integer; const row: Integer; const colIndex: Integer; var XF: Integer): TCellValue; overload; virtual; abstract;

Parameters

<-> Parameter Type Description
const sheet Integer Sheet where the cell is, 1 based.
const row Integer Row, 1 based.
const colIndex Integer Column index, 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