I'm having issues using Microsoft Interop.Excel.Application in my .Net program.
Consider the following code snippet:
// Open to force Excel to perform calculation itself
Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application();
//excelApp.WindowState = Microsoft.Office.Interop.Excel.XlWindowState.xlMinimized;
var excelWorkbook = excelApp.Workbooks.Open(tempFileName);
excelApp = null;
When I check in Task Manager, I notice that the EXCEL.EXE task created by the above code snippet does not terminate.
I'm not directly accessing any of the worksheets.
For my purposes all I need to do is:
1) Launch the application (which will force a recalc on open)
2) Save the spreadsheet
3) Terminate the application
What am I missing here?
Is there some sort of COM object that needs to be released?