I don't know anything about Python, unfortunately, but if it works through COM, Excel is not a single-instance application, so you should be able to create as many Excel instances as memory allows.
With C #, you can create multiple instances of Excel with:
Excel.Application xlApp1 = new Excel.Application(); Excel.Application xlApp2 = new Excel.Application(); Excel.Application xlApp3 = new Excel.Application();
Using the latest binding in C #, you can use:
object objXL1 = Activator.CreateInstance(Type.GetTypeFromProgID("Excel.Application")); object objXL2 = Activator.CreateInstance(Type.GetTypeFromProgID("Excel.Application")); object objXL3 = Activator.CreateInstance(Type.GetTypeFromProgID("Excel.Application"));
If you use VB.NET, VB6, or VBA, you can use CreateObject as follows:
Dim objXL1 As Object = CreateObject("Excel.Application") Dim objXL2 As Object = CreateObject("Excel.Application") Dim objXL3 As Object = CreateObject("Excel.Application")
Unfortunately in Python I don't have a hint. But is there any kind of limitation for Python (which I can’t imagine?), Then I would think that it is very useful.
Nevertheless, the idea that several Excel instances act as some kind of server for other operations sounds pretty smooth ... I would try to check what you are doing, especially regarding how many instances you can open right away without running out of memory and what happens to the calling program if Excel for some reason works.
Mike rosenblum
source share