There is a program in Office called excelenv.exe which it seems you can run within the command processor. it might look a bit scary to some but I reckon it's pretty simple. This example seems to run for me.
"C:Program FilesMicrosoft Office 15rootOffice15excelcnv.exe" -oice "e:xls.xls" e:xls.xlsx"
This converts the file s.xls to s.xlsx fairly quickly without (visually) opening Excel. The output file has more than 65536 lines but whether it has other newer Office features I have no idea.
You'd need to find the path to the program on your machine as it varies with each Office release.
I can't immediately think of how to make it do a load of files at once without lines and lines of code but maybe someone else can.
Have a go at copying this code into a file in Notepad, correct the path to excelcnv and save it as Zipconvert, then change the extension on the saved Zipconvert.txt file to .bat;
echo off
"C:Program FilesMicrosoft Office 15rootOffice15excelcnv.exe" -oice "e:xl%1.xls" e:xl%1.xlsx"
(I think I'd create a folder called excelconvert to do the conversion in rather than risk overwriting stuff - whatever, you'll need to change the paths in the command above to match your input and output folders.)
Then you can just copy your source file to your temp folder, then in the command processor go to the folder where you saved the .bat file and run Zipconvert (e.g. Zipconvert myspreadsheet) and it will create an xlsx file with the same name in the same folder.
Sound a bit complicated but it really isn't.
PS I did see some apparently adverse Excel errors which indicated exploits and safe mode - as I'm only using their own command I think these are spurious and can be ignored.
Last edited by: smokie on Wed 14 Sep 22 at 10:17
|