I'm using a combination of the below scripts to rename an xlsx extension file to an xls extension file. I find that sometimes excel remains running and prevents the script from executing. I would like to include a line in either file to terminate all running instances of excel.exe so the script can process successfully. Presently, I'm going through the task manager to end the process manually.
C:\Scripts\xlsx2xls.vbs "C:\report.xlsx" "C:\report.xls"
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.Application.DisplayAlerts = True