diff --git a/Cargo.lock b/Cargo.lock index 980ec09..4c73722 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -841,7 +841,7 @@ dependencies = [ [[package]] name = "ironcalc" version = "0.3.0" -source = "git+https://github.com/ironcalc/IronCalc?rev=264fcac63cc93b08a4b4a6764815e0c0adf6a53c#99125f1fea1c8c72c61f8cba94d847ed3471a4af" +source = "git+https://github.com/ironcalc/IronCalc?rev=264fcac63cc93b08a4b4a6764815e0c0adf6a53c#7e54cb6aa27f6d02fc3b090de4fb127c67900dc8" dependencies = [ "bitcode", "chrono", @@ -857,7 +857,7 @@ dependencies = [ [[package]] name = "ironcalc_base" version = "0.3.0" -source = "git+https://github.com/ironcalc/IronCalc?rev=264fcac63cc93b08a4b4a6764815e0c0adf6a53c#99125f1fea1c8c72c61f8cba94d847ed3471a4af" +source = "git+https://github.com/ironcalc/IronCalc?rev=264fcac63cc93b08a4b4a6764815e0c0adf6a53c#7e54cb6aa27f6d02fc3b090de4fb127c67900dc8" dependencies = [ "bitcode", "chrono", diff --git a/src/book/mod.rs b/src/book/mod.rs index a83f658..33672fe 100644 --- a/src/book/mod.rs +++ b/src/book/mod.rs @@ -278,14 +278,26 @@ impl Book { // not use a style. match self .model - .get_model() - .get_style_for_cell(sheet, cell.row as i32, cell.col as i32) + .get_cell_style(sheet, cell.row as i32, cell.col as i32) { Err(_) => None, Ok(s) => Some(s), } } + /// Set the cell style + /// Valid style paths are: + /// * fill.bg_color background color + /// * fill.fg_color foreground color + /// * font.b bold + /// * font.i italicize + /// * font.strike strikethrough + /// * font.color font color + /// * num_fmt number format + /// * alignment turn off alignment + /// * alignment.horizontal make alignment horzontal + /// * alignment.vertical make alignment vertical + /// * alignment.wrap_text wrap cell text pub fn set_cell_style(&mut self, style: &[(&str, &str)], area: &Area) -> Result<()> { for (path, val) in style { self.model @@ -315,6 +327,19 @@ impl Book { } } + /// Set the column style. + /// Valid style paths are: + /// * fill.bg_color background color + /// * fill.fg_color foreground color + /// * font.b bold + /// * font.i italicize + /// * font.strike strikethrough + /// * font.color font color + /// * num_fmt number format + /// * alignment turn off alignment + /// * alignment.horizontal make alignment horzontal + /// * alignment.vertical make alignment vertical + /// * alignment.wrap_text wrap cell text pub fn set_col_style( &mut self, style: &[(&str, &str)], @@ -332,6 +357,19 @@ impl Book { Ok(()) } + /// Set the row style + /// Valid style paths are: + /// * fill.bg_color background color + /// * fill.fg_color foreground color + /// * font.b bold + /// * font.i italicize + /// * font.strike strikethrough + /// * font.color font color + /// * num_fmt number format + /// * alignment turn off alignment + /// * alignment.horizontal make alignment horzontal + /// * alignment.vertical make alignment vertical + /// * alignment.wrap_text wrap cell text pub fn set_row_style( &mut self, style: &[(&str, &str)],