Excel COM automation
Bjorn Pettersen
BPettersen at NAREX.com
Fri Mar 14 19:01:42 EST 2003
> From: Raymond Hettinger [mailto:vze4rx4y at verizon.net]
>
[..]
> "Bjorn Pettersen"
> > We have a trivially simple Python app in production that loads Excel
> > through COM, opens an Excel file, and saves it as tab-delimited.
Today
> > we had a silent failure, and tracked it down to two instances of our
app
> > trying to use the Excel object at the same time. Is this supposed to
> > work (and if so, what steps are we missing)? And if it's not
supposed to
> > work, is there a way to determine that the COM object is "busy"?
>
> -- bjorn
>
> Excel should respond to multiple COM requests; however,
> you should do it in a threadsafe manner.
>
> Many types of access change Excel's state. For instance,
> it is common to set an activesheet and then write to the
> sheet, but another task may select another sheet leaving
> the first task writing on the wrong tab.
Thanks, that fixed the problem on my machine, but it still existed on
the original developer's machine. The difference: I'm running 2.3a2,
he's running 2.2.1. Using McMillan's Installer, I created an executable
2.3 version for him, which worked on his machine...
-- bjorn
More information about the Python-list
mailing list