Convert XLS to XSLX with Sharepoint and C#

2.3k Views Asked by At

I know about Word Automation Services, where I can start a ConversionJob which enable you to convert a .docx file to e.g. PDF or .doc.

I thought these services also allow the conversion of XLSX to XLS file - I was wrong. When looking at the SaveFormat Enumaration it only supports Word. Excel Automation Services don't seem to have such a conversion job?

How do I convert an XLS file to XLSX without using Excel automation (i.e. without having Excel installed on the server)?

EDIT:
In the end I used Aspose Cells for the conversion.

2

There are 2 best solutions below

2
On BEST ANSWER

You might try ExcelLibrary or EPPlus those libraries allow you to write excel files without using excel COM object.

You may read cell by cell and create a new worksheet copied from the other one (copy cell by cell)

1
On

I'm note sure that you can do it (converting XLS with is a row MS Excel file without having either Excel Services or MS Excel installed [Using InterOp] to XLSX which an OpenXML format)!!

If you want a way to convert it on a PC which MS Excel install check this link out http://devville.net/blog/2011/02/05/how-to-convert-rtf-document-to-doc-using-c/

But if found a way I would be happy if u share it to use.