Dear,
I have downloaded today (=March 9, 2010) the newest demoversion of XLSReadWriteII4 (v. 4.00.32a). Everytime when I try to open by me created XLSX file, I get an error message.
My code is:
//xls.version:=xvExcel2007;
XLS.Filename := 'NoteSample.xlsx';
xls.Sheet[0].AsString[1,1]:='text1';
xls.Sheet[0].AsString[2,2]:='text2';
xls.Sheet[0].AsString[3,3]:='text3';
XLS.Write;
frmmain.Caption:=xls.ComponentVersion;
ShowMessage('File saved as NoteSample.xls');
I'm not able to set xls.version by Delphi code, so I have set it as a property of XLS components.
When I try to open "NoteSample.xlsx" file in MS Excel, I get message : Application Excel has found an unreadable content. Do you want to recreate an content of sheet? If you confide this sheet, press Yes button.
When I click to yes button, content of file is shown in Excel without any errors, but there is next message: In application Excel was possible to open file after repairing or removing unreadable content. Removed records: A Motive of documents from part /xl/workbook.xml (Sheet). When I change an extension from XLSX to ZIP and open it, in file xl/workbook.xml is this text:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <workbook xmlns="http://schemas.openxmlformats.org/sprea ... /2006/main" xmlns:r="http://schemas.openxmlformats.org/offic ... ationships">
<fileVersion appName="XLSReadWriteII" lastEdited="4" lowestEdited="4" rupBuild="4.00.32" />
- <sheets>
<sheet name="Sheet1" sheetId="1" r:id="rId1" />
</sheets>
<calcPr calcId="0" />
</workbook>
Can anyone help me creating XLSX file without this errors and maybe with setting of Version value.
Thaks for your answers.
Petr Filipi, Czech Republic
Error by openning XLSX (created by XLSRWIIv4) in Office 2007
-
- Posts: 3
- Joined: Tue Feb 02, 2010 1:37 pm
Re: Error by openning XLSX (created by XLSRWIIv4) in Office 2007
Hello
I can't reproduce this problem. I have tested your sample with D6 and D2010. Files from both versions reads without any error.
In order to set the Version property, you have to put the BIFFRecsII4 unit in the uses clause.
I can't reproduce this problem. I have tested your sample with D6 and D2010. Files from both versions reads without any error.
In order to set the Version property, you have to put the BIFFRecsII4 unit in the uses clause.
Lars Arvidsson, Axolot Data
-
- Posts: 3
- Joined: Tue Feb 02, 2010 1:37 pm
Re: Error by openning XLSX (created by XLSRWIIv4) in Office 2007
Larsa,
thanks for your answer. Version in source code works fine (aftre putting the BIFFRecsII4 us uses clause). The first problem is maybe caused by local Office version. I hope I will not use or need more than 65535 lines, so I can work with XLS files.
Thanks for your fast answer.
Petr Filipi
thanks for your answer. Version in source code works fine (aftre putting the BIFFRecsII4 us uses clause). The first problem is maybe caused by local Office version. I hope I will not use or need more than 65535 lines, so I can work with XLS files.
Thanks for your fast answer.
Petr Filipi