Converting from XLS to XLSX

Questions and answers on how to use XLSReadWriteII 3/4/5.
Post Reply
QSSL
Posts: 1
Joined: Wed Jan 25, 2017 7:38 am

Converting from XLS to XLSX

Post 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
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Converting from XLS to XLSX

Post by larsa »

Hello

This will most likely work with version 5 or 6 as these versions has much better handling of XLSX file.
Lars Arvidsson, Axolot Data
Post Reply