CellStyle
Overview
CellStyle is a struct in Aspose.Cells FOSS for Rust.
Inherits from: Debug, Clone, PartialEq, and 3 more.
Represents a mutable cell style facade that can be applied to one or more cells.
This struct provides 46 methods for working with CellStyle objects in Rust programs.
Available methods include: borders, clear_horizontal_alignment, clear_number_format, clear_vertical_alignment, copy, copy_from, default, fill, font, get_borders, get_borders_mut, get_custom, and 34 additional methods.
All public members are accessible to any Rust application after installing the Aspose.Cells FOSS for Rust package.
Fields: background_color, borders, custom, fill_color, font, horizontal_alignment, and 13 more.
Fields
| Name | Type | Access | Description |
|---|---|---|---|
number | i32 | Read/Write | Gets the number. |
custom | Option<String> | Read/Write | Gets the custom. |
number_format | Option<String> | Read/Write | Gets the number format. |
horizontal_alignment | Option<HorizontalAlignment> | Read/Write | Gets the horizontal alignment. |
vertical_alignment | Option<VerticalAlignment> | Read/Write | Gets the vertical alignment. |
wrap_text | bool | Read/Write | Gets the wrap text. |
indent_level | u8 | Read/Write | Gets the indent level. |
text_rotation | u16 | Read/Write | Gets the text rotation. |
shrink_to_fit | bool | Read/Write | Gets the shrink to fit. |
reading_order | u8 | Read/Write | Gets the reading order. |
relative_indent | i32 | Read/Write | Gets the relative indent. |
pattern | FillPattern | Read/Write | Gets the pattern. |
background_color | Option<String> | Read/Write | Gets the background color. |
font | Font | Read/Write | Gets the font. |
fill_color | Option<String> | Read/Write | Gets the fill color. |
borders | Borders | Read/Write | Gets the borders. |
is_locked | bool | Read/Write | Gets the is locked. |
is_hidden | bool | Read/Write | Gets the is hidden. |
quote_prefix | bool | Read/Write | Gets the quote prefix. |
Methods
| Signature | Description |
|---|---|
default() → Self | Calls default on this CellStyle instance. |
new() → Self | Initializes a new instance. |
copy(source: &CellStyle) | Copies data from another style object. |
copy_from(source: &CellStyle) | Copies all style values from another style instance. |
get_number_format() → Option<&str> | Gets the resolved number format string. |
set_number_format(value: impl Into<String>) | Sets the resolved number format string. |
clear_number_format() | Clears number format. |
get_number() → i32 | Gets the numeric format identifier. |
set_number(value: i32) | Sets the numeric format identifier. |
get_custom() → Option<&str> | Gets the custom number format code. |
set_custom(value: impl Into<String>) | Sets the custom number format code. |
get_horizontal_alignment() → Option<HorizontalAlignment> | Gets the horizontal alignment. |
set_horizontal_alignment(value: HorizontalAlignment) | Sets the horizontal alignment. |
clear_horizontal_alignment() | Clears horizontal alignment. |
get_vertical_alignment() → Option<VerticalAlignment> | Gets the vertical alignment. |
set_vertical_alignment(value: VerticalAlignment) | Sets the vertical alignment. |
clear_vertical_alignment() | Clears vertical alignment. |
get_is_text_wrapped() → bool | Gets the associated value. |
set_is_text_wrapped(value: bool) | Sets the associated value. |
get_indent_level() → u8 | Gets the indentation level. |
set_indent_level(value: u8) | Sets the indentation level. |
get_text_rotation() → u16 | Gets the text rotation. |
set_text_rotation(value: u16) → Result<(), CellsError> | Sets the text rotation. |
get_shrink_to_fit() → bool | Gets whether the cell content shrinks to fit. |
set_shrink_to_fit(value: bool) | Sets whether the cell content shrinks to fit. |
get_reading_order() → u8 | Gets the reading order. |
set_reading_order(value: u8) → Result<(), CellsError> | Sets the reading order. |
get_relative_indent() → i32 | Gets the relative indent. |
set_relative_indent(value: i32) | Sets the relative indent. |
get_is_locked() → bool | Gets whether the cell is locked when worksheet protection is enabled. |
set_is_locked(value: bool) | Sets whether the cell is locked when worksheet protection is enabled. |
get_is_hidden() → bool | Gets whether the cell formula is hidden when worksheet protection is enabled. |
set_is_hidden(value: bool) | Sets whether the cell formula is hidden when worksheet protection is enabled. |
get_quote_prefix() → bool | Gets whether the cell value starts with a single quote mark. |
set_quote_prefix(value: bool) | Sets whether the cell value starts with a single quote mark. |
font() → &Font | Gets the font settings. |
get_font() → &Font | Gets the font settings. |
get_font_mut() → &mut Font | Gets mutable font settings, so that font properties can be changed in place: style.get_font_mut().set_size(14.0). |
set_font(font: Font) | Sets the font settings. |
fill() → Fill | Gets the associated value. |
get_fill() → Fill | Gets the associated value. |
set_fill(fill: Fill) | Sets the associated value. |
borders() → &Borders | Gets border settings. |
get_borders() → &Borders | Gets border settings. |
get_borders_mut() → &mut Borders | Gets mutable border settings, so that borders can be changed in place: style.get_borders_mut().top_mut().set_color("FFFF0000"). |
set_borders(borders: Borders) | Sets border settings. |