Excel Question

Robin Becker robin at jessikat.demon.co.uk
Mon Feb 7 07:01:38 EST 2000


In article <CJV2BFANsgn4EwgI at jessikat.demon.co.uk>, Robin Becker
<robin at jessikat.demon.co.uk> writes
>In article <Dhkn4.13546$Uz3.157150 at typhoon.midsouth.rr.com>, Bill
>Wilkinson <bwilk_97 at yahoo.com> writes
>>[Robin Becker]
>>> Why don't you make the python a server instead of a client. Then your
>>> excel could call a small vba routine to open up a python com object.
>>
>>Two reasons really.
>>
>>1.  This is a simulation model.  There are many different versions of the
>>model. I don't really want to have to register an object per model version.
>>2.  There is a performance decrease when I run the model as a server.(almost
>>twice as slow.)
>>
>>It just works really well the way I have it, if I can just get around this
>>one problem.  Now, having said that. I might have to go with the server
>>object anyway if
>>
>>
> there ought to be some way to distinguish the excel. so the button can
>pass a handle to the client. Then the client can open up the correct
>instance.
Why not create an intermediate com object to do the spawn for you. The
intermediate can be given the workbook to operate on and can pass this
as a parameter (integer value) to the spawned python.

The spawned python then enumerates all running excels and connects to
each one in turn until it can complete the handshake.
-- 
Robin Becker



More information about the Python-list mailing list