Excel Objects are not getting Closed in Task Manager
Hi,
I am using the following code to release all the excel objects from task manager.
Code:
xlWorkBook.Close()
xlApp.Quit()
releaseObject(xlApp)
releaseObject(xlWorkBook)
releaseObject(xlWorkSheet)
But the excel objects are not getting released from task manager.
Server: Windows 2008 Server R2
Office: Microsoft windows 2007
Re: Excel Objects are not getting Closed in Task Manager
There are many reasons for this to happen, the most common is explained here The Two dot rule. If you adhere to what is written up here you have a 99.99% chance of releasing all objects use for Excel automation.
If you were using VS2010 rather than VS2008 I would direct you to Basics of using Excel automation in VB.NET with emphasis on creating and destroy for a working project which shows most common Excel operations and always properly disposes of all object.
An alternate is to use OpenXML SDK or third party library such as Aspose Cells.