Python and Excel

Hans Kristian Ruud hans.kristian.ruud at inenco.no
Thu Oct 26 15:46:27 EDT 2000


Hello.

I have written a small Python application, which starts Excel by these
means:

xlApp   =  win32com.client.Dispatch('Excel.Application')
xlBook  =  xlApp.Workbooks.Open(filename)
xlApp.Workbooks.Open(filename)

(as described in "Python programming on Win32" by Hammond and Robinson).



When the application is finished, it tries to shut Excel down by calling
xlBook.Close():

xlBook.Close(SaveChanges=0)
del xlApp


My problem is that when exiting the program (and shutting down Excel as
descrined),
an Error Dialog pops up, bearing the title

OleMainThreadWndName: Excel.exe - Application error

and containing this message:

The instruction at "0x300341b6" referenced memory at "0x650eeed8".
The memory could not be "read".

Any ideas?
Thanks in advance from your humble servant
--
Hans Kristian Ruud
22 18 63 08 (jobb) 22 65 22 34 (hjemme) 952 33 224 (mob)
Wash daily from nosetip to tailtip, drink deeply but not to deep
remember the night is for hunting, forget not the day is for sleep

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20001026/57bccb7d/attachment.html>


More information about the Python-list mailing list