[python-win32] IRTD Interface differences in Excel 2003 and Excel 2007
Tim Roberts
timr at probo.com
Mon Nov 16 22:14:20 CET 2009
Jack Cowden wrote:
> I am working with the RTD functions in excel using pythoncom and a
> some great sample code from Chris Nilsson. In Excel 2003 and 2007, I
> am able to create my python object via the IRTDServer com interface.
> Excel then passes a callback interface, IRTDServerEvents to my
> object. I hold on to that interface and callback using UpdateNotify
> to let Excel know that I have an update for it. Everything works fine
> in 2003, but the interface callback in 2007 fails with an obscure COM
> error.(below) Other than that it works fine 2007. IMO, if the typelib
> information were wrong, the IRTDServer interface would not work
> either.
> ...
> Exception in thread Thread-471:
> Traceback (most recent call last):
> File "C:\Python26\Lib\threading.py", line 527, in __bootstrap_inner
> self.run()
> File "C:\Python26\Lib\threading.py", line 731, in run
> self.function(*self.args, **self.kwargs)
> File "C:\dev\python\ExcelRTD.py", line 391, in Update
> self.SignalExcel()
> File "C:\dev\python\ExcelRTD.py", line 151, in SignalExcel
> raise COMException(desc=str(why))
> COMException: (None, "(-2147352567, 'Exception occurred.', (0, None,
> None, None, 0, 0), None)", None, -1)
For what it's worth, -2147352567 is 0x80020009 which is
DISP_E_EXCEPTION. That could mean anything from a bad pointer to a math
error to an unhandled C++ exception.
Is your ServerStart returning a value greater than 0?
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list