Niemann, Hartmut wrote:
>  
>
> I want to create an Excel file through the python COM interface.
>
> I can open the file, fill the cells, save the file.
>
>  
>
> Now I want to color single characters in the cell content.
>
>  
>
> In VBA ( see
>
> http://stackoverflow.com/questions/7618121/excel-vba-change-color-of-certain-characters-in-a-cell)
>
> I would do
>
> Cell.Characters(i, 1).Font.Color = vbRed
>
>  
>
> How does that translate to Python?
>
> mycell.Characters[x:y] does not work, nor anything else I tried.
>

That's interesting.  Theoretically, the Characters object should have a
__call__ method, so you could call it exactly like in VB:
    Cell.Characters(i,1)
but I don't see that in the generated COM interface.

That's going to be an ugly one to chase down.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to