Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exception 0x800ac472 when accessing Excel
We have an application that is polling an Excel sheet on
a timer using COM. On overnight runs we often see OLE Exception with error code = 0x800ac472. These often coincide with clicking into Excel from a screen saver or Windows XP switch to user screens. If we trap the error and continue things seem OK, but I was wondering if there is anything we can do to avoid the exception. We are running on Excel 2002 under Windows XP SP1 Les |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exception 0x800ac472 when accessing Excel
One problem with driving Excel through COM is the unknown state in which
Excel could be in. For example if you want to interact with an Excel session which is in use by the user some COM calls will not work at certain times. Can't remember the specific examples I came across but some dialogs being open etc. would cause the COM call to fail. I never found a way to trap all of these cases and ended up using workarounds. You mention 'user screens'. Do you mean Excel forms? Can you also clairfy if your interacting with an existing Excel session or in your code you are instantiating a fresh Excel object and using it to load your file etc. What I did was to trap all known/available errors as best I could and if when, say getting data from a cell, failed I would just have to assume that the user was doing something which was blocking the COM call and carry on. This may account for what you say about trapping the error and continuing. By doing so you're ignoring the failed call and on the next pass it's possible Excel is back in a state where it can process the calls as normal. -- Regards, Bill Lunney www.billlunney.com "Les Spiro" wrote in message ... We have an application that is polling an Excel sheet on a timer using COM. On overnight runs we often see OLE Exception with error code = 0x800ac472. These often coincide with clicking into Excel from a screen saver or Windows XP switch to user screens. If we trap the error and continue things seem OK, but I was wondering if there is anything we can do to avoid the exception. We are running on Excel 2002 under Windows XP SP1 Les |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exception 0x800ac472 when accessing Excel
Bill,
We're writing to an existing instance, and the code is full of logic to trap the cases in which it is not safe to write to Excel, this is just an error code I haven't seen before. The user screen refers to the logging in after a Switch User on XP. Thanks for your comments Les *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
MS Excel Error - Win32 exception | Setting up and Configuration of Excel | |||
Exception with EXCEL 2007 API | Excel Worksheet Functions | |||
Exception from HRESULT: 0x800AC472 | Excel Discussion (Misc queries) | |||
Excel.Range.Name gives error an exception | Excel Discussion (Misc queries) | |||
Exception report in excel | Excel Worksheet Functions |