Python/Excel VBComponents crash

M

Mark Carter

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?
 
M

Mark Carter

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top