2009/11/17 Jack Cowden <cowd...@gmail.com>: > I set up Excel and the COM Interfaces > > EXCEL_TLB_GUID = '{00020813-0000-0000-C000- > 000000000046}' > EXCEL_TLB_LCID = 0 > EXCEL_TLB_MAJOR = 1 > #EXCEL_TLB_MINOR = 4 #Excel 2003 > EXCEL_TLB_MINOR = 6 #Excel 2007 via registry??? Is this correct? > > # Import the excel typelib to make sure we've got early-binding going > on.
Oh dear, I hard-coded those typelib version numbers, didn't I? Sorry. :) By the looks of the docs ([1] & [2]), the IRTDUpdateEvent.UpdateNotify hasn't changed -- wouldn't expect it to, though. It has been a while since I was able to play with this stuff, but you can confirm the version numbers with "makepy.py -i". There's probably a much nicer way for this to be done automatically via gencache now. > if self.__callback is None: > raise COMException(desc="Callback excel provided is Null") > try: > self.__callback.UpdateNotify() <-----------------------THIS > IS WHERE IT FAILS IN Excel 2007 > except Exception, why: Do you know if your RefreshData() routine gets called by Excel, before your UpdateNotify() returns? That would at least show UpdateNotify() is pointing at the right place. Unfortunately I don't have a copy of excel at the moment, so I can't check the order of events myself. - Chris. [1] Excel 2007 docs: http://msdn.microsoft.com/en-us/library/bb210024.aspx [2] Excel 2003 docs: http://msdn.microsoft.com/en-us/library/aa213639(office.11).aspx _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32