win32com.client -- beginner question

Axel Schmitz-Tewes Axel.Schmitz-Tewes at
Wed Jun 30 06:43:06 EDT 1999

From: Axel Schmitz-Tewes <uzs59g at>


I ' ll try to use the comclient ability of python. In the Doku I have
the example:

o = win32com.client.Dispatch("Excel.Application")
o.Visible = 1
o.Workbooks.Add() # for office 97 – 95 a bit different!
o.Cells(1,1).Value = "Hello"

Because I have installed Excel95 I have given it a try and that's the

Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import win32com.client
>>> o= win32com.client.Dispatch("Excel.Application")
>>> o.Workbooks.Add()
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "E:\Programme\Python\win32com\client\", line 400, in
    raise AttributeError, "%s.%s" % (self._username_, attr)
AttributeError: Excel.Application.Workbooks

But Workbooks.Add is a available method as I can test with VBScript.
Is my installation corrupt or do I do some silly mistake or perhaps some
more serious?

Thanks for any answer.

More information about the Python-list mailing list