Closing Excel 97 with Python

AMR alvaro at ocse.infonegocio.com
Wed Apr 26 14:03:16 CEST 2000


Hello,

I'm using COM to exchange information with Excel and my problem is the next.

This is my way to open Excel:

self.o = win32com.client.dynamic.Dispatch("Excel.Application")

self.o.Visible = Visible

self.o.Workbooks.Open(self.MyFile)

And this is my way to close Excel:

self.o.Visible = 0

self.o.Workbooks(1).Close(0)

self.o.Workbooks.Close()

self.o.Quit ## For try something

After this Excel is still opened in the task administrator, and when I try
to open Excel again from python i only see the menu , status bar and the
tool bar. I have to open the full view of excel to see the worksheet.

If you have a clue to close Excel 97...

Thank you anyway,







More information about the Python-list mailing list