win32com and Excel

Discussion in 'Python' started by Bram Stolk, May 12, 2004.

  1. Bram Stolk

    Bram Stolk Guest

    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 testMSOfficeEvents.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: 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
    ------------------------------------------------------------------------------
     
    Bram Stolk, May 12, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. chris
    Replies:
    5
    Views:
    605
    chris
    Dec 20, 2004
  2. Al Christians

    Controlling Excel with win32com

    Al Christians, Nov 17, 2005, in forum: Python
    Replies:
    0
    Views:
    445
    Al Christians
    Nov 17, 2005
  3. koia
    Replies:
    1
    Views:
    403
  4. Ant

    Win32com, and Excel issues.

    Ant, Apr 18, 2007, in forum: Python
    Replies:
    3
    Views:
    517
  5. Mike P

    Win32com and Excel

    Mike P, Jan 10, 2008, in forum: Python
    Replies:
    2
    Views:
    1,164
    John Machin
    Jan 10, 2008
Loading...

Share This Page