I have been using pywin32 successfully for years to control Excel. Now,
suddenly I get errors executing the same code that has run previously.
My python code controls Excel like this:
import win32com.client
xl = win32com.client.DispatchEx("Excel.Application")
xl.DisplayAlerts = 0
xl.visible = 0
The last line('xl.visible = 0') now causes an error:
<type 'exceptions.AttributeError'>'<win32com.gen_py.Microsoft Excel 14.0 Object
Library._Application instance at 0x425283464>' object has no attribute
'visible' [Function: glyphscript Line:63 | Function: __setattr__ Line:470]
This error goes away if I use xl.Visible instead of xl.visible - notice the
uppercase V. But then I get all sorts of other errors, in places that didn't
error previously.
Why would this code have worked for years, and then suddenly not work now?
I am using Python 2.6.5 and pywin32-214 on 64 bit Windows 7. I uninstalled and
reinstalled Python and pywin32, but the new errors persist.
-Kurt
________________________________
Confidentiality Notice: This email may contain confidential and/or privileged
information. If you are not the intended recipient of this message, please
delete it immediately and inform the sender that you have received this message
in error.
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32