Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > win32com and Excel

Thread Tools

win32com and Excel

Bram Stolk
Posts: n/a
Hi there,

I am accessing Excel's functionality via COM, by using the
win32com extention.

This works somewhat:
If I run it from the 'IDLE' editor, I get frequent hangs or errors.
Sometimes the app hangs, and Excel then waits indefinately for a COM
operation completion.
Sometimes, I get errors about properties not being writable (which
realy are writable).
I then need to kill excel en python stuff, and try again. Sometimes
it works, sometimes I get in a corrupt state.
Running without the IDLE environment, I get much better results.

After checking the file, I deciced to add a
OnQuit() to my event handler. Strangely enough, OnQuit events are only
sent for MS-Word, and not MS-Excel.

Is this an ommission in win32com, or in MS Excel itself? I cant find a
mention of OnQuit in the Visual Basic script help files.

I would like to discern between the closing of a workbook, and the
closing of the entire excel app.


Bram Stolk

Bram Stolk, VR Engineer.
SARA Academic Computing Services Amsterdam, PO Box 94613, 1090 GP AMSTERDAM
email: Removed) Phone +31-20-5923059 Fax +31-20-6683167

"Software is math. Math is not patentable."
"Software is literature. Literature is not patentable." -- slashdot comment
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Win32com and Excel Mike P Python 2 01-10-2008 10:04 AM
Win32com, and Excel issues. Ant Python 3 04-18-2007 07:03 PM
Excel ShapeRange problem with win32com koia Python 1 03-16-2006 01:45 AM
Controlling Excel with win32com Al Christians Python 0 11-17-2005 07:09 AM
Use macros in Excel via win32com chris Python 5 12-20-2004 01:48 PM