Page 1 of 1

Converting from XLS to XLSX

Posted: Wed Jan 25, 2017 8:28 am
by QSSL
Is there any way to convert an xls file to xlsx.
I tried the following code but it does not work:

xls := TXLSReadWriteII4.Create(Self);
xls.Filename := 'InputFile.xls';
xls.Read;

xls.Version := xvExcel2007;
xls.Filename := 'OutputFile.xlsx';
xls.Write;

Excel displays the following error when I try to read the file:
- Excel found unreadable content in file OutputFile.xlsx

Re: Converting from XLS to XLSX

Posted: Wed Jan 25, 2017 10:00 am
by larsa
Hello

This will most likely work with version 5 or 6 as these versions has much better handling of XLSX file.