[python-win32] Excel win32com newbie question

Tim Roberts timr at probo.com
Fri Oct 6 19:27:00 CEST 2006


Jim Steil wrote:

>Thanks for the response!  I tried your suggestion with the following
>results....
>
>  
>
>>>>import win32com.client
>>>>x = win32com.client.gencache.EnsureDispatch("Excel.Application")
>>>>        
>>>>
>Traceback (most recent call last):
>  File "<input>", line 1, in ?
>  File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line
>536, in EnsureDispatch
>    mod = EnsureModule(tla[0], tla[1], tla[3], tla[4],
>bForDemand=bForDemand)
>  File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line
>393, in EnsureModule
>    module = GetModuleForTypelib(typelibCLSID, lcid, major, minor)
>  File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line
>258, in GetModuleForTypelib
>    mod = _GetModule(modName)
>  File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line
>629, in _GetModule
>    mod = __import__(mod_name)
>  File
>"C:\Python24\lib\site-packages\win32com\gen_py\00020813-0000-0000-C000-00000
>0000046x0x1x5\__init__.py", line 1748
>    '{000208C8-0001-0000-C000-000000000046}' : 'IWalls',
>	'{000208C9-0001-0000-C000-000000000046}' : 'ITickLabels',
>                                                        ^
>SyntaxError: invalid syntax
>  
>

I'm beginning to think you may have some fundamental problem.  I'm
running Python24, and I have that exact same file in my gen_py cache,
but IWalls is at line 2,063, not line 1,748.  What version of Excel is
this?  I'm running Excel 2003.

Hmmm, I'm still at Python-Win32 build 204, so there is a difference
there.  Still, there is no syntax error there that I can see.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-win32 mailing list