XLSX (EXCEL) to XLS (EXCEL) Converter Convert your xlsx files to xls online & free. Advanced XLS Converter provides a the quickest, easiest and affordable way to convert Excel (XLS, XLSX, XLSM) files to a great variety of database formats, including DBF, TXT, HTML, XML, CSV, SQL, RTF - all with a few clicks of the mouse!
Active1 year, 5 months ago
I have to work with an old application that can only export XLS files and I write programs in .Net using the EPPlus library that is only capable of reading XLSX files.
What is the easiest way to batch convert from XLS to XLSX?
OriginOrigin16811 gold badge22 silver badges1717 bronze badges
5 Answers
Check out Office Migration Planning Manager.
The toolkit also contains the Office File Converter (OFC), which enables bulk document conversions from binary to OpenXML formats. (Technet)
ChrisNChrisN
I'd recommend using a macro to process the files within a folder to convert them from xls to xlsx. This code assumes that the files are all located within one folder and that all xls files need to be converted, but if you wanted to select individual files this code could be updated.
This code would need to be run from an Excel 2007 or Excel 2010 workbook.
If the files you are converting contain macros then you would need to update the 'FileFormat:=51' to read 'FileFormat:=52'. Or if you don't need to macro code in the converted files you could leave it alone and it will remove the macros when it converts it to the xlsx format.
Nick PerkinsNick Perkins
pratappratap
If you have MsOffice installed, then this tool might be worth a download for a quick fix.
When you select a folder to see the xls files converted, make sure you tick the convert tool option that uses MS Office to the conversion, not their own converter.
If you use their own converter you will lose colors in the cells and single sheet seems to come out.If you use the MsOffice as the converter seems to work nicely.Good tool for a quick fix.
99Sono99Sono
So I wrote a simple VBScript to convert .xls files to .xlsx in a silent fashion.
convert-xls-xlsx.vbs :
NOTE: Look out for spaces in the folder path, if your path has a space in between, put the path in quotes.
revosftwrevosftw
Not the answer you're looking for? Browse other questions tagged microsoft-excelconversion or ask your own question.
Active4 years, 2 months ago
I'm working on some code that generates an Excel spreadsheet server-side and then downloads it to the user. I'm using ExcelPackage to generate the file.
The generation is working just fine. I can open the generated files using Excel 2007 with no issues. But, I'm having trouble downloading the file with
Response.TransmitFile()
.Right now, I have the following code:
When Excel 2007 opens the file downloaded as above, it gives the 'file format doesn't match extension' warning. After clicking past the warning, Excel displays the raw xml contents of the file.
If I change the file extension, like so
Excel 2007 gives an 'Excel found unreadable content in the file' error, followed by a dialog that offers to locate a converter on the web. If I click 'no' on this dialog, Excel is able to load the data.
I've also experimented with different MIME types, like
application/vnd.ms-excel
and application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
, combined with file extensions of .xls and .xlsx. All combinations result in one of the two behaviors mentioned above.What is the correct combination of file extension and MIME type to use in this scenario? What else could cause this failure, other than an improper MIME type or extension?
FYI, this is occurring with Visual Studio's built-in development web server. I haven't yet tried this with IIS.
OdradeOdrade4,6401010 gold badges3636 silver badges6363 bronze badges
3 Answers
I can't definitely say that there's anything wrong with your approach, but I'll just share some observations from doing something similar.
Headers are Pascal Case, most browsers shouldn't care but I would change your content-disposition to Content-Disposition. Changing the Charset shouldn't be necessary or relevant. Your content type should be fine, I would only use application/vnd.openxmlformats-officedocument.spreadsheetml.sheet and .xlsx if that is actually the content of the file, otherwise stick with application/vnd.ms-excel and .xls.
Another thing you should consider is sending the browser the Content-Length:
Also have you tried this with multiple browsers? Just wondering if it's a vendor-specific problem.
As a last ditch effort, you can set your Content-Type to application/octet-stream, and any browser should offer to download it, and then most browsers will let you open it after it's downloaded based on the extension.
Brad NabholzBrad Nabholz
Mayank Jain4,12266 gold badges2626 silver badges5959 bronze badges
mohsen nikzadehmohsen nikzadeh
Karthikeyan PKarthikeyan P