Merlin
Merlin

Reputation: 25669

Python to control macros in mutliple instances of Excel

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: Using Python to program MS Office macros?

Upvotes: 1

Views: 627

Answers (1)

x0n
x0n

Reputation: 52450

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

Upvotes: 1

Related Questions