If you’re having lot of excel files in .xlsx format and you need to convert all those into .xls formats without opening each file one by one, here is a perfect solution.
Make your own excel converter using the below steps.
Open Notepad and copy the below code.
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open(Wscript.Arguments(0))
objExcel.Application.Visible = False
objExcel.Application.DisplayAlerts = False
objExcel.ActiveWorkbook.SaveAs Wscript.Arguments(1), 56
objExcel.ActiveWorkbook.Close
objExcel.Application.DisplayAlerts = True
objExcel.Application.Quit
WScript.Quit
Save the file as xlsconvert.vbs (Please save it as .vbs file and not .txt file)
Related: Password protect Microsoft Excel files
Now call this batch file using the following command. E:convertxlsconvert.vbs “E:convertinput.xlsx” “E:convertoutput.xls”
Note: In the above command, please change the folder path as necessary.
After converting the XLSX file into XLS format, it will be stored in the same folder.
Comments on this entry are closed.
every time i executed the command D:convertxlsconvert.vbs “D:test.xlsx” “D:test.xls” , the .vbs file got open… Please check..
Thanks for this!