MathNya / umya-spreadsheet

A pure rust library for reading and writing spreadsheet files
MIT License
239 stars 41 forks source link

Output number to String #126

Closed ziyouwa closed 11 months ago

ziyouwa commented 11 months ago

let a = "000001".to_string(),

tyied these: sheet.get_cell_mut("B1").set_value(format!("{:0>6}", a.b)); // only 1 sheet.get_cell_mut("B1").set_value(a.b.clone()); //only 1 sheet.get_cell_mut("B1").set_value(&a.b); // only1

when output it to file, only display 1. How to display 000001 as txt?

john-dc252 commented 11 months ago

you can use set_value_string instead of set_value

ziyouwa commented 11 months ago

you can use set_value_string instead of set_value

Thanks!