4

The internet says that you can convert xlsx files to xls files using Microsoft Office Compitablity like this:
"C:\Program Files\Microsoft Office\Office14\excelcnv" -nme -oice D:\test\new.xlsx D:\test\old.xls
However, this works backwards - it converts xls files to xlsx files. Does anyone know the excelcnv switches to convert xlsx to xls?

Kara
  • 6,115
  • 16
  • 50
  • 57
Idan Arye
  • 12,402
  • 5
  • 49
  • 68
  • [citation needed]. The [first source I found](http://social.msdn.microsoft.com/Forums/en-US/innovateonoffice/thread/daa3b45c-5c4b-44c1-bb35-a108b8dc13f8) via a quick search that deals with this notes that this isn't possible using `excelcnv`. – Joey Oct 09 '11 at 23:26
  • Is there another free command line tool that can do it? – Idan Arye Oct 09 '11 at 23:47

2 Answers2

4

For me, using the compatibility (conversion) pack for Office 2003, simply switching the places of the parameters in the example you cite works; e.g. if this also works for ~\Office14 (which I assume and hope it does), change the command this way:

"C:\Program Files\Microsoft Office\Office14\excelcnv" -nme -oice D:\test\old.xls D:\test\new.xlsx

In my case, the particular command that gets it to work, which I found yonder (and simply reversed the parameters like so), is this:

"C:\Program Files (x86)\Microsoft Office\Office12\excelcnv.exe" -oice "C:\scripts\test1.xls" "C:\scripts\test1.xlsx"
Alex Hall
  • 956
  • 10
  • 18
  • 1
    Well, I'm no longer working with Office, and nowadays I try to stay as far away from Windows as possible - so I can't verify the answer. I'll simply accept it. – Idan Arye Feb 05 '15 at 16:17
2

I came across this question whilst looking for a way to convert XLSX to XLS using the command line. I couldn't get the solution presented here to work, but I managed to find a solution by installing Libre Office 5 then using the command:

"C:\Program Files\libreoffice 5\program\soffice.exe" --convert-to xls "original-file.xlsx"

This outputted the file as "original-file.xls"

potatan
  • 21
  • 1