Page 1 of 1
Create bad Excel 2007 .xlsx File (Zlib decompress error)
Posted: Sat Jan 29, 2011 2:18 am
by vga
hello:
My code:
uses BIFFRecsII4,XLSFonts4, XLSReadWriteII4;
procedure TForm1.btn1Click(Sender: TObject);
begin
xls1.Version := xvExcel2007;
xls1.Sheet[0].AsInteger[1,1] := 90;
xls1.Filename := 'c:\aa.xlsx';
xls1.Write;
xls1.Read;
end;
xlsreadwrite version 4.0.0.X
Error Info: "Zlib decompress error"
It createed 'c:\aa.xlsx' file, but I can not open by Excel 2007 ?
Help!
Re: Create Excel 2007 File Error!!
Posted: Mon Mar 07, 2011 7:55 am
by vga
How to create a Excel 2007 File?
Re: Create Excel 2007 File Error!!
Posted: Tue Mar 08, 2011 1:45 pm
by vga
with the new version 4.0049 I could not create a good .XLSX file too.
procedure TForm1.btn1Click(Sender: TObject);
begin
xls1.Version := xvExcel2007;
xls1.Sheet[0].AsInteger[1,1] := 90;
xls1.Filename := 'c:\aa.xlsx';
xls1.Write;
end;
it did create 'c:\aa.xlsx' file, but
xls1.Read;
can not work.
Re: Create Excel 2007 File Error!!
Posted: Thu Mar 10, 2011 8:40 pm
by larsa
Hello
I can't find any problem with your code.
Re: Create Excel 2007 File Error!!
Posted: Sat Mar 12, 2011 1:07 pm
by vga
my ide: delphi xe xlsreadwriteII 4.00.52
procedure TForm1.btn1Click(Sender: TObject);
begin
xls1.Version := xvExcel2007;
xls1.Sheet[0].AsInteger[1,1] := 90;
xls1.Filename := 'c:\aa.xlsx';
xls1.Write;
xls1.read;
end;
it did create 'c:\aa.xlsx' file, but when run to:
xls1.Read;
error occur: "Zlib decompress error"
Re: Create Excel 2007 File Error!!
Posted: Sat Oct 08, 2011 7:03 am
by vga
[quote="larsa"]Hello
I can't find any problem with your code.[/quote]
which IDE version?
In delphi XE, the followinf code always says: "Zlib decompress error"
procedure TForm1.btn1Click(Sender: TObject);
begin
xls1.Version := xvExcel2007;
xls1.Sheet[0].AsInteger[1,1] := 90;
xls1.Filename := 'c:\aa.xlsx';
xls1.Write;
xls1.read; // run to here, error occur: "Zlib decompress error"
end;