1

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.

Dennis G
  • 21,405
  • 19
  • 96
  • 133

2 Answers2

1

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)

Ahmed Magdy
  • 5,956
  • 8
  • 43
  • 75
  • this link http://stackoverflow.com/questions/151005/create-excel-xls-and-xlsx-file-from-c might help you more – Ahmed Magdy Feb 24 '11 at 08:14
  • ExcelLibrary looks very interesting and is open source - but it doesn't convert, so I would still have to read the one file row by row and save that as XLSX... what a hassle ;-) – Dennis G Feb 24 '11 at 10:11
0

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.

Ahmed Magdy
  • 5,956
  • 8
  • 43
  • 75
  • Thanks for your input, the link you provided simply does an interop conversion of a MS Word file - I'm looking for Excel and **not** using interop. – Dennis G Feb 22 '11 at 13:17