[AccessD] Excel object behavior

McGillivray, Don [IT] Donald.A.McGillivray at sprint.com
Mon Sep 22 17:10:36 CDT 2008


Hello, All

I have a procedure that exports a bunch of data to Excel, and then uses the Excel object model to manipulate the resulting spreadsheets (creating pivot tables, applying formatting, and the like.)  Usually it works as advertised, but some of my users are having a problem where the UI freezes (or maybe it just appears to freeze).

In trying to isolate the problem, I watched the effects of my code carefully, and I notice that the Excel instance that I create in code doesn't terminate until the procedure itself is finished.  This, despite the fact that I have closed, quit, and set to nothing all Excel related objects before the end of the procedure.  I know through experience that failing to terminate Excel objects correctly leaves the instance alive even at the end of the procedure.  So I assume that I'm killing them correctly since the instance does indeed die.

Can anybody tell me if I should expect to see the instance survive until the end of the proc, or is there something else I ought to be doing when I'm finished with Excel?

Thanks!

Don McGillivray





More information about the AccessD mailing list