Hi,
within my application I'm creating an excel instance, registering a XLL and opening the workbook through a macro within that registered XLL. Afterwards I'm trying to release everything but excel stays in memory. Not loading the file "fileName" closes the excel instance without problems.
My code looks like that:
Karsten
within my application I'm creating an excel instance, registering a XLL and opening the workbook through a macro within that registered XLL. Afterwards I'm trying to release everything but excel stays in memory. Not loading the file "fileName" closes the excel instance without problems.
My code looks like that:
// start
NetOffice.ExcelApi.Application _excel = new Excel.Application();
_excel.RegisterXLL(xllFullPath);
_excel.Run("MacroThatOpensFile", fileName);
NetOffice.ExcelApi.Workbook excelWorkbook = ExcelApp.Workbooks[System.IO.Path.GetFileName(fileName)];
//release
excelWorkbook.Close(saveChanges: saveReport);
excelWorkbook.Dispose();
excelWorkbook = null;
_excel.Quit();
_excel.Dispose();
_excel = null;
Thanks in advance,Karsten