problem with makepy output

Paul E. Bible pbible at home.com
Sun Jan 16 19:23:32 EST 2000


It looks like makepy is grabbing an older version of Excel for some reason.
Try using makepy from the Excel9.olb (this is Excel's Type Library) from the
..\Microsoft\Office\ subdirectory.  Then copy the generated Python file to
your own  import file (eg. Excel9.py) somewhere on your PYTHONPATH.  Once
you've done that, just import Excel9 and that's it.  I'm running Windows/NT
(SP4) with Office 2000 and this works fine.

Good Luck,
Paul



"Calishar" <calishar@*NOSPAM*home.com> wrote in message
news:4vg48skfrigntmuslpfm40ngea5pdl4r2m at 4ax.com...
> Hello again folks,
>
>   Just tried using makepy (from win32all-127) to create a python
> module wrapping MS-Excel 2000, it worked fine, I moved the module to a
> directory in the python path, and imported it. This was the result.
>
> ------------
> PythonWin 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on
> win32
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> Portions Copyright 1994-1999 Mark Hammond (MHammond at skippinet.com.au)
> >>> import excel5
> >>> app=excel5.Application()
> Traceback (innermost last):
>   File "<interactive input>", line 1, in ?
>   File "c:\Program Files\Python\kadabra\excel5.py", line 804, in
> __init__
>     oobj = pythoncom.new(self.CLSID)
> com_error: (-2147221164, 'Class not registered', None, None)
> ------------
>
> However, the same process worked on MS-Word 2000. Just wondering how I
> would start debugging this.
>
> Calishar





More information about the Python-list mailing list