My application is a plugin (DLL) of another application. From my application I launch Excel, then simply open a workbook and save it.
Dim oExcel As Object = CreateObject("Excel.Application")
oExcel.Visible = False
oExcel.DisplayAlerts = False
Dim oWorkBook As Object = oExcel.Workbooks.Open(excelFileName)
oWorkBook.Save()
oWorkBook.Close(True)
oExcel.Quit()
oWorkBook = Nothing
oExcel = Nothing
The problem is that the instance of Excel I created does not close until the main application (again my app is a plugin of another application) closes.
Is there anything I can do besides killing the process? I tried System.Runtime.InteropServices.Marshal.ReleaseComObject(obj) and calling the garbage collector to no avail.
TIA.