Code: Select all
xlApp := ComObjActive("Excel.Application")
xlWb := xlApp.ActiveWorkbook
FilePathNoExt := RegExReplace(xlWb.FullName,"\..*?$") ; Remove last . and everything after
xlApp.DisplayAlerts := false ; avoid overwrite alerts
xlWB.SaveAs(FilePathNoExt ".xlsx", xlOpenXMLWorkbook := 51)
xlApp.DisplayAlerts := true
Code: Select all
Run, %A_WorkingDir%\Table.xls
Sleep, 2000
ControlGetPos , X, Y, Width, Height, Button1, Microsoft Excel
ControlClick, Button1, Microsoft Excel
Sleep, 2000
Click, %X%, %Y%
xlApp := ComObjActive("Excel.Application")
xlWb := xlApp.ActiveWorkbook
FilePathNoExt := RegExReplace(xlWb.FullName,"\..*?$") ; Remove last . and everything after
xlApp.DisplayAlerts := false ; avoid overwrite alerts
xlWB.SaveAs(FilePathNoExt ".xlsx", xlOpenXMLWorkbook := 51)
xlApp.DisplayAlerts := true