Excel Process stays in the air

Add-in Express™ Support Service
That's what is more important than anything else

Excel Process stays in the air
 
keren friedman




Posts: 16
Joined: 2006-07-27
Hi,

I saw this problem was already posted once, but was solved by itself.

We're using add-in express for an Excel Plugin, using VS2005.

There are many times that the EXCEL.EXE process stays in the air even after closing it (when the add-in is present), and when opening Excel again, we can see the add-in menu/toolbar, but they are empty and non-functioning (like the dll is not loaded or something).

When killing the process from the task manager and opening Excel, everything works fine again.

What can be the cause of this?

Thanks for your help...
Posted 05 Dec, 2006 04:30:32 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Keren.

Can you please review the add-in code and use the Marshal.ReleaseComObject method with Excel interfaces if they are no longer used.

P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 05 Dec, 2006 08:13:50 Top
keren friedman




Posts: 16
Joined: 2006-07-27
Hi Sergey,

Can you please clarify?

1. What do you mean "with Excel interfaces if they are no longer used"? When is that? What are Excel interfaces?
2. Can you give me a code example?
3. Is this issue familiar?
Posted 07 Dec, 2006 02:34:07 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Keren.

This is not the issue. Please read about the Marshal.ReleaseComObject class in the VS Help. You can send me the code of the addinmodule if you wish. I will change it.
Posted 07 Dec, 2006 11:01:15 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Keren,

Also you can look for the ReleaseComObject method use in my article http://www.add-in-express.com/creating-addins-blog/2006/08/17/outlook-not-closing/.

Hope this helps.
Posted 07 Dec, 2006 11:12:49 Top
keren friedman




Posts: 16
Joined: 2006-07-27
Thanks Andrei and Sergey.

In the addinModule I have the following property:

public Excel._Application ExcelApp
{
get
{
return (HostApplication as Excel._Application);
}
}

I am using it in many places.
Where and how should I call Marshal.ReleaseComObject ?

Thanks!
Posted 13 Dec, 2006 06:02:04 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Keren.

This code is OK. Is it all that you have in the addinmodule?
Posted 13 Dec, 2006 15:43:41 Top
keren friedman




Posts: 16
Joined: 2006-07-27
Yes, This is the only place I have a reference to Excel._Application.
As I said, I'm referring this.ExcelApp in many places.

Thanks

Posted 14 Dec, 2006 03:29:13 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Keren, do you use Excel interfaces (e.g. Range, Workbook, Worksheet and so on) in the add-in code? If so, could you please send me the code? I will try to help.
Posted 14 Dec, 2006 06:46:52 Top
keren friedman




Posts: 16
Joined: 2006-07-27
I use all of these in many places.

My AddInModule is 1600 lines long. do you want me to send it to you? How?


Posted 19 Dec, 2006 03:43:22 Top