XLSReadWriteII4 very very slow
Posted: Thu Apr 19, 2012 9:58 am
Hi
I'm using version 4.00.57 of XLSReadWriteII4 for Delphi XE2. I'm reading an Excel 2007 file of 154.00 rows and 24 cols.
Older versions of excel have a row limit of about 65536 rows and reading all lines in 1 second.
When I read a .xlsx file with say 154000 rows and I call XLSReadWriteII4 read it takes very very long to read the file (122 seconds!!!).
Sample code :
procedure TForm1.Button1Click(Sender: TObject);
var a : tdatetime;
b : double;
begin
label1.Caption := 'Start.....' ;
label1.Refresh;
a := now();
XLSReadWriteII41.Version := xvExcel2007;
XLSReadWriteII41.Filename := 'Largefile.xlsx' ; //154.000 lines
XLSReadWriteII41.Read;
b := (now() - a)*86400;
label1.Caption := inttoStr(round(b))
end;
procedure TForm1.Button2Click(Sender: TObject);
var a : tdatetime;
b : double;
begin
label2.Caption := 'Start.....' ;
label2.Refresh;
a := now();
XLSReadWriteII41.Version := xvExcel97;
XLSReadWriteII41.Filename := 'Limitfile.xls' ; //65.000 lines
XLSReadWriteII41.Read;
b := (now() - a)*86400;
label2.Caption := inttoStr(round(b))
end;
Where is the problem??
I'm using version 4.00.57 of XLSReadWriteII4 for Delphi XE2. I'm reading an Excel 2007 file of 154.00 rows and 24 cols.
Older versions of excel have a row limit of about 65536 rows and reading all lines in 1 second.
When I read a .xlsx file with say 154000 rows and I call XLSReadWriteII4 read it takes very very long to read the file (122 seconds!!!).
Sample code :
procedure TForm1.Button1Click(Sender: TObject);
var a : tdatetime;
b : double;
begin
label1.Caption := 'Start.....' ;
label1.Refresh;
a := now();
XLSReadWriteII41.Version := xvExcel2007;
XLSReadWriteII41.Filename := 'Largefile.xlsx' ; //154.000 lines
XLSReadWriteII41.Read;
b := (now() - a)*86400;
label1.Caption := inttoStr(round(b))
end;
procedure TForm1.Button2Click(Sender: TObject);
var a : tdatetime;
b : double;
begin
label2.Caption := 'Start.....' ;
label2.Refresh;
a := now();
XLSReadWriteII41.Version := xvExcel97;
XLSReadWriteII41.Filename := 'Limitfile.xls' ; //65.000 lines
XLSReadWriteII41.Read;
b := (now() - a)*86400;
label2.Caption := inttoStr(round(b))
end;
Where is the problem??