openpyxl.cell.rich_text module¶
RichText definition
-
class
openpyxl.cell.rich_text.CellRichText(*args)[source]¶ Bases:
listRepresents a rich text string.
Initialize with a list made of pure strings or
TextBlockelements Can index object to access or modify individual rich text elements it also supports the + and += operators between rich text strings There are no user methods for this classoperations which modify the string will generally call an optimization pass afterwards, that merges text blocks with identical formats, consecutive pure text strings, and remove empty strings and empty text blocks
-
class
openpyxl.cell.rich_text.TextBlock(font, text)[source]¶ Bases:
openpyxl.descriptors.StrictRepresents text string in a specific format
This class is used as part of constructing a rich text strings.
-
font¶ Values must be of type <class ‘openpyxl.cell.text.InlineFont’>
-
text¶ Values must be of type <class ‘str’>
-