Python/Excel VBComponents crash

Discussion in 'Python' started by Mark Carter, Aug 7, 2003.

  1. Mark Carter

    Mark Carter Guest

    I use Office 2000, and I have recently upgraded to python 2.3 and
    win32all-155.exe

    The following code worked in python 2.2:

    xlApp = Dispatch("Excel.Application")
    xlApp.Visible = 1
    xlApp.Workbooks.Add()
    xlApp.ActiveWorkbook.SaveAs(sys.path[0] + '\\temp.xls')
    wb = xlApp.Workbooks("temp.xls")
    wbc = wb.VBProject.VBComponents # <---- CAUSES CRASH IN 2.3
    xlApp.Quit()
    del xlApp

    but I get a GPE in 2.3, when the code finishes execution:
    EXCEL caused an invalid page fault in
    module OLE32.DLL at 0167:65f18ae3.

    If you comment out the line
    wbc = ...
    then I get no GPE.
    Any ideas?
     
    Mark Carter, Aug 7, 2003
    #1
    1. Advertising

  2. Mark Carter

    Mark Carter Guest

    > Mark Carter wrote:
    > > wbc = wb.VBProject.VBComponents # <---- CAUSES CRASH IN 2.3


    > I think this is a bug in Excel,


    I had raised this as issue 785258 in Sourceforge's pywin32 page. Your
    response has been added to the issue, and I reclassified the issue as
    Invalid (because we are saying that it was raised in error).
     
    Mark Carter, Aug 9, 2003
    #2
    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. Paul Miller
    Replies:
    10
    Views:
    963
    Jeff Epler
    Jul 16, 2003
  2. Fabien SK

    Embeding Python, COM crash

    Fabien SK, Jul 30, 2003, in forum: Python
    Replies:
    0
    Views:
    319
    Fabien SK
    Jul 30, 2003
  3. zxo102
    Replies:
    3
    Views:
    3,264
    Stuart Corrie
    Aug 9, 2005
  4. dan_roman
    Replies:
    3
    Views:
    1,914
    John Machin
    Oct 5, 2006
  5. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,512
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
Loading...

Share This Page