[python-win32] Starting a New excel.exe Process as Opposed to Recycling an Existing Excel

Bilokon, Paul paul.bilokon at citi.com
Wed Aug 19 18:12:57 CEST 2009


I shall answer my own question (thanks to David Foster who pointed this out and Tim Golden for posting it):

http://www.thalesians.com/finance/index.php/Knowledge_Base/Python/General#Starting_a_new_instance_of_a_COM_application

The trick is to use DispatchEx rather than Dispatch.

Best wishes,
Paul

________________________________
From: python-win32-bounces+paul.bilokon=citi.com at python.org [mailto:python-win32-bounces+paul.bilokon=citi.com at python.org] On Behalf Of Bilokon, Paul [ICG-MKTS]
Sent: 18 August 2009 14:29
To: 'python-win32 at python.org'
Subject: [python-win32] Starting a New excel.exe Process as Opposed to Recycling an Existing Excel

Hi all,

I notice that

excel = win32com.client.Dispatch("Excel.Application")
does not necessarily create a new excel.exe process. If excel.exe is already running, then it will be recycled and a new process will not be created.

However, I would like to have some control over this and tell it to create a new process -- simply for the sake of having a cleaner environment.

Is this at all possible?

Many thanks,
Paul

Paul Bilokon, Vice President
Citigroup | FX - Options Trading | Quants
33 Canada Square | Canary Wharf | Floor 3
London, E14 5LB
Phone: +44 20 798-62191
paul.bilokon at citi.com<mailto:paul.bilokon at citi.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20090819/42feae73/attachment.htm>


More information about the python-win32 mailing list