My vb.net code is used to generate an Excel spreadsheet. Once the Excel file is created and both the program and Excel is closed, a phantom process remains. I've tried the following:
Dim xlApp As Excel.Application
Dim xlWorkBook As Excel.Workbook
Dim xlWorkSheet As Excel.Worksheet
Dim xlWorkSheet2 As Excel.Worksheet
Dim xlRange As Excel.Range
'Write data to Excel here
Marshal.ReleaseComObject(xlApp)
Marshal.ReleaseComObject(xlWorkBook)
Marshal.ReleaseComObject(xlWorkSheet)
Marshal.ReleaseComObject(xlWorkSheet2)
I've also tried some other things where the process is killed programmatically. What I'd like to do is to keep the Excel workbook that was generated by the code opened and kill the phantom process without killing the opened spreadsheet. For some reason, the hidden process is not visible while Excel is still opened but after manually closing Excel a process remains opened. Any suggestions?