Hi all.
I need to open a excel file with about 3000 lines and 5 columns , and for each cell do some calculation
and them write them in a database searching previously if cell one does not exist in my db file.
How can I do that ??
Mant thanks.
Regards
Read sequentially an excel file
Re: Read sequentially an excel file
Hello
Here is an example:
Here is an example:
Code: Select all
XLS[0].CalcDimensions;
for r := XLS[0].FirstRow to XLS[0].LastRow do begin
for c := XLS[0].FirstCol to XLS[0].LastCol do begin
// Do something with the values.
case XLS[0].CellType[c,r] of
xctNone : ;
xctBlank : ;
xctBoolean : B := XLS[0].AsBoolean[c,r];
xctError : ;
xctString : S := XLS[0].AsString[c,r];
xctFloat : V := XLS[0].AsFloat[c,r];
xctFloatFormula : ;
xctStringFormula : ;
xctBooleanFormula: ;
xctErrorFormula : ;
end;
end;
end;
Lars Arvidsson, Axolot Data
Re: Read sequentially an excel file
Thank you so much.
Works perfectly..
Regards
Works perfectly..
Regards