hi can anyone help me with the below code, i have an excel sheet that i need to open and repair then save, i do this because it tends to break atlot. any help much appreciated
; Open the Excel document
xlApp := ComObjCreate("Excel.Application") ; create a (new) instance of Excel
xlApp.Visible := true ; make Excel visible
xlApp := ComObjActive("Excel.Application") ; make Excel active
xlApp := xlApp.Workbooks.Open("C:\Users\Phill\Desktop\New Microsoft Excel Worksheet.xlsx", CorruptLoad := XlCorruptLoad.xlRepairFile)
xlApp := "" ; clear the variable
return
There are two issues here:
Solutions:
Here is the full (untested) code: