Code: Select all
xl := ComObjCreate("Excel.Application") ; init excel instance
xl.Visible := false ; set instance to not be visible
wb := xl.Workbooks.Open(filePath) ; open wb
; do whatever I want to do
; wb.Close(False) throws me an error about invalid command or something
xl.Quit() ; exit instance (this is not working, when I try to open the file again it throws me into read more only)