Page 1 of 1

Problem concerning TXLSReadWriteII5.Version property

Posted: Thu Mar 27, 2014 9:08 am
by phen
Hello,

After switching from XLSReadWrite Version 4 to Version 5 I can observe the following:
-Occurs in Delphi 2007 and Delphi XE5
-XLS : TXLSReadWriteII5
-In RAD Studio the XLS.Version property is set to xvExcel97
-I read information from an Excel 97 file as before, e.g. XLS.Read, process the information, and after that is done just call

Code: Select all

 XLS.Clear
-Then at some point I want to save the alteration by deleting the old file an completely build a new one and here the problem occurs; In that order :

Code: Select all

 
XLS.Clear;
// XLS.Version :=  Xc12Utils5.xvExcel97; // Workaround for a correct .xls file
XLS.Sheets[0].As....; //put information in Sheet "0" 
XLS.Filename := example.xls; //set correct filename for Excel 97 file
XLS.Write;
XLS.Clear;
-Builds a file with .xls fileextension but Excel itself tells you it´s broken but opens it nevertheless because it´s actually an Excel 2007 file (.xlsx) with a wrong fileextension
-The workaround helps but it´s ugly and I don´t want to keep it there because I know myself and I´m pretty much sure I´ll forget that I put that specific line therein which will cause problems

Is this a bug that will be fixed? I need to know if I have to redesign this.

Greetings

Re: Problem concerning TXLSReadWriteII5.Version property

Posted: Mon Mar 31, 2014 5:21 am
by larsa
Hello

I can't reproduce this. When I test your code, I get the expected file, XLS/Excel 97.