MortalreminderPT / edit-xlsx

A quick and easy-to-use Rust library for Excel file editing.
https://crates.io/crates/edit-xlsx
25 stars 4 forks source link

when color change within text -> panic #14

Closed mschnell1 closed 5 months ago

mschnell1 commented 7 months ago

unwrap None in edit-xlsx\src\xml\worksheet\sheet_data\cell\inline_string.rs:45:39

MortalreminderPT commented 7 months ago

unwrap None in edit-xlsx\src\xml\worksheet\sheet_data\cell\inline_string.rs:45:39

Can you tell me more about it, error messages or codes that cause panic?

mschnell1 commented 7 months ago

It happened when I define a color to some characters in the text in a cell, that (supposedly) otherwise is default. If you can't easily reproduce it, I'll take another look on Monday

mschnell1 commented 7 months ago

@MortalreminderPT Posting this in an Issue with "color" in its name: I did mention that RGB works fine for me In my example "Themes" also works, but I just guessed what the values (seemingly an integer index and a "fade" ranging -1.0 ... 1.0) might indicate. Is there any documentation on color themes and any additional information for the used themes to be extracted from the library ?

mschnell1 commented 6 months ago

@MortalreminderPT

Can you tell me more about it, error messages or codes that cause panic?

Rich text still seems to panic in the library without me being able to create an error message.

(Just coloring part of the text in a cell.)

thread 'main' panicked at C:\Users\mschnell.cargo\git\checkouts\edit-xlsx-1e0a98df980a5c31\2c08e2a\src\xml\worksheet\sheet_data\cell\inline_string.rs:45:39: called Option::unwrap() on a None value

(using branch main on GitHub)

mschnell1 commented 5 months ago

Works ! Thanks !

mschnell1 commented 5 months ago

@MortalreminderPT Hmmmm. Trying to get the Rich text content ....

Again I cam Pretty Print it, but the type RichText seems to be buried in the privat api module and not accessible from the user software