Error by openning XLSX (created by XLSRWIIv4) in Office 2007
Posted: Tue Mar 09, 2010 1:34 pm
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
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