Closing Excel 97 with Python

David Fisher python at rose164.wuh.wustl.edu
Wed Apr 26 14:52:59 CEST 2000


----- Original Message -----
From: "AMR" <alvaro at ocse.infonegocio.com>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Wednesday, April 26, 2000 7:03 AM
Subject: Closing Excel 97 with Python


> 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

try calling:

self.o.Quit()
                ^^

instead
dnf





More information about the Python-list mailing list