Excel hangs with RTD and interop

J

jhaldi

I've created an application (VB .NET) which uses the interop library to
periodically poll a few cells in an open excel worksheet and retrieve those
values from the cells and use them in the application. The application works
fine as written. In a nutshell, in my code I define an array, then define an
excel range, and assign the range.value to my array.

When I use this application and point it at an excel which has RTD links
built into it which are updating frequently, it eventually causes Excel to
lock up. The task manager claims that its still responding, but it in fact
won't repaint itself, won't accept user input, etc. It appears this happens
when I make my COM call to Excel because it causes my app to also hang until
I hard kill the Excel process. Then my app frees up with an exception saying
Excel is no longer available.

My question is, what is it about the interop library which would cause such
an ungraceful hang within Excel. It seems to me that the COM calls to get
the values in the range are somehow colliding with the COM calls to the iRTD
interface.

Has anybody heard of similar behavior and/or know of any threads I could
read which might shed some light on this subject? My project requirements
are to be able to bring excel values into my application from a spreadsheet
which is updating frequently as it brings in RTD data and performs
calculations on the data and generates new values which we need in our
application.

Many thanks,

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top