Cancel: Boolean)
function
type
TXLSCellReadEvent = procedure(
Sender: TObject;
SheetIndex, Row, Col: Integer;
const Value: Variant;
const Formula: WideString;
var Cancel: Boolean) of object;
function ForEachCell(Callback: TXLSCellReadEvent): Integer;
Pastabos
ForEachCell in the callback to stop the scan early. The return value is the number of callbacks that were made
in the callback to stop the scan early. The return value is the number of callbacks that were made SheetIndex, Rowcontains the formula text for formula cells and is empty for ordinary value cells Col in the callback to stop the scan early. The return value is the number of callbacks that were made Value procedure Formula const
const Cancel to True var
begin
procedure TForm1.ReadCell(Sender: TObject; SheetIndex, Row, Col: Integer;
const Value: Variant; const Formula: WideString;
var Cancel: Boolean);
begin
Memo1.Lines.Add(Format('%d:%d = %s', [Row, Col, VarToStr(Value)]));
if Row >= 1000 then
Cancel := True;
end;
Visited := Workbook.Sheets[1].ForEachCell(ReadCell);
'%d:%d = %s'