Results 1 to 2 of 2

Thread: Excel Objects are not getting Closed in Task Manager

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2011
    Posts
    114

    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

  2. #2
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,713

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width