win32com /makepy
Paul.Casteels at ua.ac.be
Paul.Casteels at ua.ac.be
Fri Oct 18 16:40:51 EDT 2002
Thomas Heller <thomas.heller at ion-tof.com> wrote:
: Paul.Casteels at ua.ac.be writes:
:> This simple program works, but is slow when I start adding arrays :
:>
:> from win32com.client import Dispatch
:> xlApp = Dispatch("Excel.Application")
:> xlApp.Workbooks.Add()
:> xlApp.ActiveWorkBook.SaveAs('tutu')
:> xlApp.Quit()
:> del xlApp
:>
:> After I run makepy, to speed it up, (Excel 9.0 Object Library), this program
:> produces :
:>
:> Traceback (most recent call last):
:> File "C:\DOCUME~1\paul\MYDOCU~1\Python\Cvt\testExcel.py", line 6, in ?
:> xlApp.ActiveWorkBook.SaveAs(Filename = 'tutu')
:> File "C:\Python22\Lib\site-packages\win32com\client\__init__.py", line
:> 346, in __getattr__
:> raise AttributeError, attr
:> AttributeError: ActiveWorkBook
:>
:> Why is ActiveWorkBook no longer available ?
:> I had this with ActivePython 2.2.0, I have updated to 2.2.1 but the
:> resut is the same.
: Isn't all this case-sensitive after running makepy?
: You could also look into the generated file for ActiveWorkBook...
: HTH,
: Thomas
Great, it's ActiveWorkbook and much faster ! Thanks Thomas.
--
Paul Casteels Paul.Casteels at ua.ac.be Tel: +32.3.8202455
Fax: +32.3.8202470
University of Antwerp Dpt.Physics
Universiteitsplein 1
B-2610 Wilrijk
Belgium
More information about the Python-list
mailing list