View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Matthew Wieder Matthew Wieder is offline
external usenet poster
 
Posts: 48
Default Excel Automation Issue

We are having the following odd issue in our C# application that
automates Excel. We wrote a layer of code which creates the Excel
objects, handles them and then calls Marshal.ReleaseComObject on them
and setts them to null. We were very meticuluos to go through and
ensure nothing is being referenced without it being released. Here's
what's happening. The first iteration through, Excel opens exceutes
fine but hangs around after the call to GC.Collect. Because Excel isn't
going away on it's own, I kill Excel from the task manager here. On all
subsequent interations, Excel executes properly and dissapears after
each time on it's own. Does anyone have suggestions as to what's going
on? Why is Excel hanging around after the first iteration?
thanks!