George Flaherty wrote: > I have been messing around Excel, but when I run the following example I get > an error? > > Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. >>>> from win32com.client import Dispatch >>>> xlApp = Dispatch("Excel.Application") >>>> xlApp.Visible = 1 >>>> xlApp.Workbooks.Add() > <COMObject Add> >>>> xlApp.ActiveSheet.Cells(1,1).Value = 'Python Rules!' >>>> xlApp.ActiveWorkbook.ActiveSheet.Cells(1,2).Value = 'Python Rules 2!'
>>> xlApp.ActiveWorkbook.Close(SaveChanges=0) >>> xlApp.Quit() Workbooks have the Close method. _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32