简体   繁体   中英

openpyxl - style on characters

I am trying to port my code from pywin32 to openpyxl . But I can't find the way to change the color style on partial characters in the cell. In pywin32 , I can use: Range(Cell).GetCharacters(Start, Length).Font.ColorIndex to do this. But it seems there is no such method like that in openpyxl ?

The simple answer is that a cell is the smallest item to which you can apply styles to. You can work around this restriction by embedding formatting within the text but this is even messier than it sounds.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM