[python-win32] Cannot assign values to the Excel Colors property
Joe Goldthwaite
joe at goldthwaites.com
Tue Aug 24 00:35:12 CEST 2004
Here's another strange one. Automating Excel with Python is turning out to
be a little more difficult than I thought. I'm trying to set the color
property of the workbook object. In VB it goes like this;
Workbook.Colors(1) = &H254A70
When I try doing this in Python, It complains about the syntax and tells me
I can't assign a value to a function call. I also tried this;
Workbook.Colors[1] = 0xH254A70
But it tells me "TypeError: object doesn't support item assignment". I'm
sure there's a way to do it but the syntax eludes me. Anyone have any
ideas?
Thanks again.
More information about the Python-win32
mailing list