Questions and answers on how to use XLSReadWriteII 5.
a.menghini
Posts: 18 Joined: Thu Aug 26, 2010 7:26 am
Post
by a.menghini » Tue May 31, 2016 7:27 am
Hi Support,
I try to create runtime and save an XLS file in version 97 but when I write it the file is XLSX type.
Code: Select all
xls := TXLSReadWriteII5.Create( nil );
try
xls.Version := xvExcel97;
xls.Filename := 'C:\Test.xls';
xls.Add;
xls.Sheets[ 0 ].AsString[ 0, 0 ] := 'D_TRANSAZIONE';
xls.write
finally
FreeAndNil( xls );
end;
Can you help me ?
thanks
Alberto
larsa
Site Admin
Posts: 926 Joined: Mon Jun 27, 2005 9:30 pm
Post
by larsa » Tue May 31, 2016 12:01 pm
Hello
Your code works correct. It creates an XLS file.
Lars Arvidsson, Axolot Data
soptimkrze
Posts: 1 Joined: Wed Oct 05, 2016 3:11 pm
Post
by soptimkrze » Wed Oct 05, 2016 3:18 pm
Hello,
we have the same problem with the version 5.20.79, I have set version to 97 before I call the write function.
When Excel opens the file, it signalises that the file has a wrong extension. This warning is correct, it's xlsx!
What is the problem / solution?
Best regards,
JP
larsa
Site Admin
Posts: 926 Joined: Mon Jun 27, 2005 9:30 pm
Post
by larsa » Wed Oct 05, 2016 7:46 pm
Hello
Don't know. I get an XLS file if I uses the code above.
Lars Arvidsson, Axolot Data