Unable to parse rich text from existing documents (can't find documentation)
Hi, I've been reviewing the documentation and code for parsing out rich text in a xlsx file but there doesn't seem to be relevant documentation for what I'm trying to do. Simply put, I'm just trying to get bold and italic font information from rich text.
I have a sample file below which only has text in a single cell that is bolded: test.xlsx
My workbook is loaded with wb = xl.load_workbook(filename=xlsx, rich_text=True)
and I've even made sure to check that def read_rich_text(xml_source)
is the function being called.
I've tried a few things, but they all really just amount to this:
for sheet in wb.worksheets:
if not sheet.title in SHEETS:
continue
values = sheet.values
data = sheet.rows
for line in data:
print(type(line))
print(line)
It seems no matter what I do, the returned text is just 'str'.
I'm not quite sure what I'm doing wrong, but I am testing with the tip of master currently. Any ideas?