Closed FlixCoder closed 5 months ago
This is because rich text is stored differently from normal text, the content of rich text is not stored in value. Therefore it is (temporarily) unreadable
Can you read rich text content using the following method? I did a simple test and it worked in my test
let workbook = Workbook::from_path("tests/xlsx/rich-text.xlsx")?;
let worksheet = workbook.get_worksheet(1)?;
let cell = worksheet.read_cell("A1")?;
let rt = cell.rich_text.unwrap();
println!("{:?}", rt);
Yes I tested that previously and it works. But there is only the Debug impl, no method to retrieve the values and formats ^^
BTW I can "pretty print" Rich text by
if let Some(rt) = cell_content.rich_text {
let s = format!("{:?}", rt))
...
But the RichText
type (result of cell_content.rich_text()
) is not available, because the words
element in edit-xlsx-0.4.4/src/api/cell/rich_text.rs
is not public or featuring a get function.
With my project I do need the "words"...
@MortalreminderPT any news ?
@MortalreminderPT any news ?
Yes, I see the problem. I'll fix it later.
You can try reading rich text and its words with the new test case
Thanks, with 0.4.5 it works
When reading cells with rich text formatting, one can not retrieve the value as it seems. Maybe I am missing something?