Python/Excel VBComponents crash

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark Carter

    Python/Excel VBComponents crash

    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.ActiveWor kbook.SaveAs(sy s.path[0] + '\\temp.xls')
    wb = xlApp.Workbooks ("temp.xls")
    wbc = wb.VBProject.VB Components # <---- 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

    #2
    Re: Python/Excel VBComponents crash

    > Mark Carter wrote:[color=blue][color=green]
    > > wbc = wb.VBProject.VB Components # <---- CAUSES CRASH IN 2.3[/color][/color]
    [color=blue]
    > I think this is a bug in Excel,[/color]

    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).

    Comment

    Working...