In this example we are converting a file called MyFile.xls in the temp directory to MyFle.xlsx in the same temp directory. I didn't have any luck getting this to work without using absolute path.
- Open a command prompt
- Execute the following (after adjusting it to meet your specific environment:
"C:\Program Files\Microsoft Office\Office14\excelcnv.exe" -oice "C:\temp\MyFile.xls" "C:\temp\MyFile.xlsx"
Since this is command line driven you can script many files easily.
@ECHO OFF
FOR %%X in (".\*.xls") DO IF NOT %%~xX == .xlsx echo Converting "%%~dpnxX" & "C:\Program Files\Microsoft Office\Office14\excelcnv.exe" -nme -oice "%%~dpnxX" "%%~dpnX.xlsx"
WARNING: For some reason Excel may tell you that it didn't launch correctly and ask you if you want to run it in safemode. I have no clue as to why this is, but clicking No each time seems to work fine. It will do this for each file.