views:

49

answers:

1

How Do control with python multiple instances of Excel. This is not read/write, but more running macros on different workbooks.

Ex: Excel.exe running Book1.xls. has mac1 Excel.exe running Book2.xls. has mac2.

I got one instance to work, this first instance, which use 2003. I could not figure out the other instance which is 2007.

If 2 can be done, can 3 or 4, Or is the a limit. I thought of memcache launching the different instances, but really not sure, if workable.

TIA

working on apply this: http://stackoverflow.com/questions/2141967/using-python-to-program-ms-office-macros

A: 

Unfortunately you cannot control which instance you get back when grabbing things from the ROT (running object table.) Only the first instance of an application will register itself.

http://support.microsoft.com/kb/238975

However, each document is registered in the ROT so in your case you may be able to find the right instance by looking for documents.

-Oisin

x0n
Can you give me an example for the above example? thanks... for quick answer
any helpful thoughts?
x0n
I use python (trying,more) and VBA (trying, less)