placing a Python com object into Excel

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mathew

    #1

    placing a Python com object into Excel

    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éta-MCI \(MVP\)

    #2
    Re: placing a Python com object into Excel

    Hi!

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

    @-salutations
    --
    Michel Claveau





    Comment

    • Mathew

      #3
      Re: placing a Python com object into Excel

      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



      Méta-MCI (MVP) wrote:
      Hi!
      >
      Perso, I started from "excelAddin .py" (in
      C:\Python25\Lib \site-packages\win32c om\demos).
      And, I'm happy with the result (who run OK with Excel 2000, XP, 2007).
      >
      @-salutations

      Comment

      • Tim Roberts

        #4
        Re: placing a Python com object into Excel

        Mathew <myeates@jpl.na sa.govwrote:
        >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 IOleInPlaceObje ct is
        required to satisfy Excel.

        http://msdn2.microsoft.com/en-us/library/aa751972.aspx
        --
        Tim Roberts, timr@probo.com
        Providenza & Boekelheide, Inc.

        Comment

        Working...