EXCEL.EXE does not terminate


Hi,
when I close the Browser-window in which my web-application opens an excel report, generated by Aspose.Excel, the Excel-process often does not terminate, which causes some trouble: When I call the report with different data for the second time, the generated Excel-file does not show the correct values (it keeps the old values). I have to manually end the Excel-process. After stopping the Excel-process, the correct data is shown in the excel-file again.
Can there be done something about that behaviour??

Regards,
wolfgang

Hi Wolfgang,

When you use OpenInBrowser option to open an excel report in browser window, the excel process only terminates after you close this browser window. If you don’t close the browser window, the excel process will still run in the background. That’s the routine of IE and MS Excel.

You can try to use OpenInExcel option or force the user to close the browser window.

Hi KK,

If your program is a web application, you cannot terminate excel process in client machine. If your program is a windows application, you can try to use Process.GetProessesByName method to get excel processes and use Process.Kill method to terminate them.