placing a Python com object into Excel

M

Mathew

Hi
I have seen examples from Mark Hammonds book where a Python COM object
is accessed from Excel with a VBA script. But, what if I want to Insert
a Python COM into the Sheet itself?

When I try this, a list of available objects appear. But my object isn't
on the list.

Anybody have any ideas?

Mathew
 
M

Méta-MCI \(MVP\)

Hi!

Perso, I started from "excelAddin.py" (in
C:\Python25\Lib\site-packages\win32com\demos).
And, I'm happy with the result (who run OK with Excel 2000, XP, 2007).

@-salutations
 
M

Mathew

Thanks for the tip. But, instead of an AddIn, what if I want to be able
to insert an object? I see that the demo adds items to the windows
registry under \Excel\AddIns. Is there a similar location for the
"Insert Object" command?

yikes. More Excel programming than I'd like to know.

Mathew
 
T

Tim Roberts

Mathew said:
Thanks for the tip. But, instead of an AddIn, what if I want to be able
to insert an object? I see that the demo adds items to the windows
registry under \Excel\AddIns. Is there a similar location for the
"Insert Object" command?

What you see there is the list of registered ActiveX controls. You need to
implement a few additional interfaces. I believe IOleInPlaceObject is
required to satisfy Excel.

http://msdn2.microsoft.com/en-us/library/aa751972.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top