[python-win32] embedding an excel object

Peter Schay pschay@pobox.com
Fri, 14 Feb 2003 01:00:44 -0800 (PST)


Hello,

I'm having a blast with Python and Pythonwin; they are
both really impressive.  Normally I like to figure
things out myself but there's just too much I don't
know at this point.  I hope somebody can offer
suggestions for how I can do the following:

I'd like to get a python instance of an Excel Active-X
object and customize it a little and serve it up as a
Python COM service.  (At least I think that's what I
need to do).  Can I do this?  How?

The test product I'm extending with Python COM has a
few interfaces that I can write COM servers for.  One
of these is a script viewer.  The script viewer is
supposed to be an Active-X control.  I assume that
implies a whole bunch of required methods and
properties, which I'm assuming are part of some Excel
object out there?  In Microsoft's OLE/COM viewer under
the "embeddable objects" category I can see a few
called "Microsoft Excel Chart".  I am hoping I can use
one of these.

I suppose I have to add the extra interfaces required
by the test product I'm extending -- actually there
seem to be just 2: an Init function, and a ShowTest
function.  The VB example given for ShowTest just
populates a listbox.  The custom listbox shows up
nicely within the browser window of the test
management tool.  So I'm using Python rather than VB,
and I'd like to embed an Excel sheet in there instead
of a listbox.  Is this feasible?

Thanks!!
Pete