[python-win32] Forcing win32com.client.dispatch to start up a fresh Excel

Tom_RobbinsMilne@swissre.com Tom_RobbinsMilne at swissre.com
Tue Jun 21 22:27:01 CEST 2005


John,

>> If this means "Can I create a totally different independant instance of 

>> Excel so that I don't run the risk of stuffing up what the user is 
doing 
>> with their existing instance", then I'd like to know too.

That's exactly what it is.

Actually a bit more complicated than that for me.

I'm building a farm of XP boxes to run Excel spreadsheet based models.

I have a bit of python to act as a server, reading a message over a 
socket, calling out to Excel, and returning the result.

I expect to be running more than one server on a machine, and hence more 
than one "instance" of Excel.

What Tim proposed worked for me in the simple test I ran (meaning it 
didn't kill the already-running-instance of excel when I ran it a few 
times).

Soon I'll be doing the more involved thing, with a farm of one. I'll 
certainly let y'all know if it doesn't work!

Thanks,
Tom



John Machin <sjmachin at lexicon.net> 

Sent by: python-win32-bounces+tom_robbinsmilne=swissre.com at python.org
06/21/2005 04:15 PM




To

cc
python-win32 at python.org
Subject
Re: [python-win32] Forcing win32com.client.dispatch to start up a fresh 
Excel






Tom_RobbinsMilne at swissre.com wrote:

>
> Hi,
>
> I'm trying to use Python's win32com interface to drive an excel 
> spreadsheet.
>
> I've managed to have it open the sheet, call a VBA function with 
> arguments, and close it down cleanly.
>
> However, if Excel is already running, it closes the open instance. 
> Which is not good.
>
> Is there a way I can do the equivalent of VBA's CreateObject() with 
> win32com? 


If this means "Can I create a totally different independant instance of 
Excel so that I don't run the risk of stuffing up what the user is doing 
with their existing instance", then I'd like to know too.

_______________________________________________
Python-win32 mailing list
Python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32





This e-mail, including attachments, is intended for the person(s) or company named and may contain confidential and/or legally privileged information. Unauthorized disclosure, copying or use of this information may be unlawful and is prohibited. If you are not the intended recipient, please delete this message and notify the sender
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20050621/1340da5e/attachment-0001.htm


More information about the Python-win32 mailing list