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
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)
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
Post a Comment