"Baehr, Manuel" <manuel.ba...@comsoft.aero> wrote in message
news:737a64deb003704788e5ce515ed146054b6...@csmail.comsoft.de...
Hi John,
Check out the thread "Multiple formats in a cell" in this
group around 2009-03-06.
thanks for the link! However, I can't use xlwt (and xlrd) because I have
to modify an existing excel sheet containing macros. Therefore I used
the "win32com" module in python under Windows. This works pretty fine
except for my original problem.
Any idea how to do it using win32com? So far I only know how to set
properties of an entire cell.
cell.Font.ColorIndex = 6
But as I said, I would like to do it for parts of the text of the cell
content.
Cheers,
Manuel
I recorded an Excel macro to color parts of a cell to find the correct
syntax. This should work, but I get an error:
xl.ActiveCell.Characters(1,5).ColorIndex
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
AttributeError: Characters instance has no __call__ method
The Excel documentation says Characters is a method that should support
Start and Length parameters.
Anybody know how to call this correctly?
-Mark
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32