Calling Python Script from MS Excel?

fishboy fishboy at spamspamspam.com
Tue Jun 8 06:39:19 CEST 2004


On Mon, 07 Jun 2004 21:14:49 -0400, "Kevin T. Ryan"
<kevryan0701 at yahoo.com> wrote:

>Hi Group - 
>
>I have written a "semi-program" in MS Excel related to running a football
>pool.  I've updated it over the past two years or so, to the point where it
>is getting pretty advanced.  Only, there are a few tricks that I want to
>add that I could not do in Excel - so I did them in Python :)  Except as it
>stands, the current python scripts have to be run via the command line. 
>Does anyone know how to allow interaction between Excel and Python via
>EXCEL?
>
>I've looked on Mark Hammond's page, and I've figured out how to interact
>with Python and Excel from PYTHON, but I can't seem to find the right info
>for making the calls from the other end (i.e. from Excel).  Any advice
>would be GREATLY appreciated!
>
>PS - If anyone has any interest in this type of program, please let me know
>- I'd be more than willing to release via the GPL or something to that
>effect.  Thanks Again...

You can use COM to go both ways.  Just create a COM server in Python
and register it so that Excel can find it.

Check out "Quick Start to Server side COM and Python" in the win32
documents.

You will have to write a little VBScript on the excel side to
interface, I think.

><{{{*>




More information about the Python-list mailing list