controlling Excel2000 with COM

Christer Fernstrom fernstrom at multimania.com
Sat Apr 1 16:03:35 EST 2000


I tried the most obvious thing with COM with Excel 20000 in Windows 2000 (p.
67 in "Programming on 32")

>> import win32com.client
>> xl = win32com.client.Dispatch("Excel.Application")
  -- This launches Excel (as verified with the windows task manager)
>> xl.visible =1 (I also tried to capitalise Visible)
Result:
Traceback (innermost last):
  File "<pyshell#2>", line 1, in ?
    xl.visible =1
  File "D:\tools\Python\win32com\client\dynamic.py", line 453, in
__setattr__
    raise AttributeError, "Property '%s.%s' can not be set." %
(self._username_, attr)
AttributeError: Property 'Excel.Application.visible' can not be set.

Anybody got a clue? Is this a problem related to Office2000?

    christer






More information about the Python-list mailing list