win32com and Excel

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bram Stolk

    win32com and Excel

    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 testMSOfficeEve nts.py 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.

    Thx,

    Bram Stolk

    --
    ------------------------------------------------------------------------------
    Bram Stolk, VR Engineer.
    SARA Academic Computing Services Amsterdam, PO Box 94613, 1090 GP AMSTERDAM
    email: bram@nospam.sar a.nl Phone +31-20-5923059 Fax +31-20-6683167

    "Software is math. Math is not patentable."
    OR
    "Software is literature. Literature is not patentable." -- slashdot comment
    ------------------------------------------------------------------------------
Working...