pub struct Style { /* private fields */ }Expand description
§Examples
§add border

use umya_spreadsheet::*;
let mut book = new_file();
let mut style = book
.sheet_by_name_mut("Sheet1")
.unwrap()
.style_mut("D2");
// add bottom border
style
.borders_mut()
.bottom_mut()
.set_border_style(Border::BORDER_MEDIUM);
// add top border
style
.borders_mut()
.top_mut()
.set_border_style(Border::BORDER_MEDIUM);
// add left border
style
.borders_mut()
.left_mut()
.set_border_style(Border::BORDER_MEDIUM);
// add right border
style
.borders_mut()
.right_mut()
.set_border_style(Border::BORDER_MEDIUM);§change cell color

use umya_spreadsheet::*;
let mut book = new_file();
let mut style = book
.sheet_by_name_mut("Sheet1")
.unwrap()
.style_mut("A1");
// fill color on red.
style.set_background_color(Color::COLOR_RED_STR);§change font color

use umya_spreadsheet::*;
let mut book = new_file();
let mut style = book
.sheet_by_name_mut("Sheet1")
.unwrap()
.style_mut("A1");
// font color on red.
style
.font_mut()
.color_mut()
.set_argb(Color::COLOR_RED);Implementations§
Source§impl Style
impl Style
pub fn font(&self) -> Option<&Font>
pub fn get_font(&self) -> Option<&Font>
👎Deprecated since 3.0.0:
Use font()
pub fn font_mut(&mut self) -> &mut Font
pub fn get_font_mut(&mut self) -> &mut Font
👎Deprecated since 3.0.0:
Use font_mut()
pub fn set_font(&mut self, value: Font) -> &mut Self
pub fn remove_font(&mut self) -> &mut Self
pub fn fill(&self) -> Option<&Fill>
pub fn get_fill(&self) -> Option<&Fill>
👎Deprecated since 3.0.0:
Use fill()
pub fn fill_mut(&mut self) -> &mut Fill
pub fn get_fill_mut(&mut self) -> &mut Fill
👎Deprecated since 3.0.0:
Use fill_mut()
pub fn set_fill(&mut self, value: Fill) -> &mut Self
pub fn background_color(&self) -> Option<&Color>
pub fn get_background_color(&self) -> Option<&Color>
👎Deprecated since 3.0.0:
Use background_color()
pub fn set_background_color<S: AsRef<str>>(&mut self, color: S) -> &mut Self
pub fn set_background_color_solid<S: AsRef<str>>( &mut self, color: S, ) -> &mut Self
pub fn set_background_color_with_pattern<S: AsRef<str>>( &mut self, color1: S, color2: S, pattern: PatternValues, ) -> &mut Self
pub fn remove_fill(&mut self) -> &mut Self
pub fn borders(&self) -> Option<&Borders>
pub fn get_borders(&self) -> Option<&Borders>
👎Deprecated since 3.0.0:
Use borders()
pub fn borders_mut(&mut self) -> &mut Borders
pub fn get_borders_mut(&mut self) -> &mut Borders
👎Deprecated since 3.0.0:
Use borders_mut()
pub fn set_borders(&mut self, value: Borders) -> &mut Self
pub fn remove_borders(&mut self) -> &mut Self
pub fn alignment(&self) -> Option<&Alignment>
pub fn get_alignment(&self) -> Option<&Alignment>
👎Deprecated since 3.0.0:
Use alignment()
pub fn alignment_mut(&mut self) -> &mut Alignment
pub fn get_alignment_mut(&mut self) -> &mut Alignment
👎Deprecated since 3.0.0:
Use alignment_mut()
pub fn set_alignment(&mut self, value: Alignment) -> &mut Self
pub fn remove_alignment(&mut self) -> &mut Self
pub fn numbering_format(&self) -> Option<&NumberingFormat>
pub fn get_numbering_format(&self) -> Option<&NumberingFormat>
👎Deprecated since 3.0.0:
Use numbering_format()
pub fn numbering_format_mut(&mut self) -> &mut NumberingFormat
pub fn get_numbering_format_mut(&mut self) -> &mut NumberingFormat
👎Deprecated since 3.0.0:
Use numbering_format_mut()
pub fn set_numbering_format(&mut self, value: NumberingFormat) -> &mut Self
pub fn remove_numbering_format(&mut self) -> &mut Self
pub fn number_format(&self) -> Option<&NumberingFormat>
pub fn get_number_format(&self) -> Option<&NumberingFormat>
👎Deprecated since 3.0.0:
Use number_format()
pub fn number_format_mut(&mut self) -> &mut NumberingFormat
pub fn get_number_format_mut(&mut self) -> &mut NumberingFormat
👎Deprecated since 3.0.0:
Use number_format_mut()
pub fn set_number_format(&mut self, value: NumberingFormat) -> &mut Self
pub fn remove_number_format(&mut self) -> &mut Self
pub fn format_id(&self) -> u32
pub fn get_format_id(&self) -> u32
👎Deprecated since 3.0.0:
Use format_id()
pub fn set_format_id(&mut self, value: u32) -> &mut Self
pub fn protection(&self) -> Option<&Protection>
pub fn get_protection(&self) -> Option<&Protection>
👎Deprecated since 3.0.0:
Use protection()
pub fn protection_mut(&mut self) -> &mut Protection
pub fn get_protection_mut(&mut self) -> &mut Protection
👎Deprecated since 3.0.0:
Use protection_mut()
pub fn set_protection(&mut self, value: Protection) -> &mut Self
pub fn remove_protection(&mut self) -> &mut Self
pub fn default_value() -> Self
pub fn get_default_value() -> Self
👎Deprecated since 3.0.0:
Use default_value()
Trait Implementations§
Source§impl PartialOrd for Style
impl PartialOrd for Style
impl StructuralPartialEq for Style
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnsafeUnpin for Style
impl UnwindSafe for Style
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more