XLSReadWriteII4 very very slow

Questions and answers on how to use XLSReadWriteII 3/4/5.
Post Reply
Max
Posts: 8
Joined: Wed May 12, 2010 8:54 am

XLSReadWriteII4 very very slow

Post by Max »

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??
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: XLSReadWriteII4 very very slow

Post by larsa »

Hello

This will be fixed in version 5 of the component, that we are working on now.
Lars Arvidsson, Axolot Data
Post Reply