Releasing .NET Automation Addins for MS Excel

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Releasing .NET Automation Addins for MS Excel

  1. #1
    Join Date
    Feb 2006

    Exclamation Releasing .NET Automation Addins for MS Excel


    I have a question about .NET automation addins for MC Office and Excel in particular. I have created a C# automation addin for Excel by using a COM interop wrapper - along the lines of:

    The addin works great. However, my problem appears when I try to release the add-in. In the past I've used XLLs and was able to load and release the addin on the fly by simply unchecking the addin from the tools>add-ins menu. this is really handy when you need to recompile. Unfortunately I don't seem to be able to achieve the same behaviour for my automation addin. Does anyone know how to release/unload?

    Any help much appreciated !! Thanks

  2. #2
    Join Date
    Feb 2006
    i'm still struggling with this - please please someone help me

  3. #3
    Join Date
    Feb 2004
    Try the following:
    Include the Excel COM object into your project.
    In code:
    //Initialize Excel
    Excel._Application App;
    App = (Excel._Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Applicat ion");
    //do your work
    //To release Excel
    int z;
    z = System.Runtime.InteropServices.Marshal.ReleaseComObject(App);
    while (z != 0);
    App = null;

Similar Threads

  1. Replies: 0
    Last Post: 12-26-2005, 08:43 AM
  2. Excel Object not releasing
    By Hariharan in forum .NET
    Replies: 1
    Last Post: 07-05-2005, 08:12 AM
  3. I'm confused !!!
    By cgts in forum .NET
    Replies: 24
    Last Post: 02-28-2003, 03:43 PM
  4. C# & .NET
    By Vikas Garg in forum Careers
    Replies: 18
    Last Post: 07-13-2002, 11:58 AM
  5. Replies: 0
    Last Post: 03-20-2002, 05:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center