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

NameTypeAccessDescription
numberi32Read/WriteGets the number.
customOption<String>Read/WriteGets the custom.
number_formatOption<String>Read/WriteGets the number format.
horizontal_alignmentOption<HorizontalAlignment>Read/WriteGets the horizontal alignment.
vertical_alignmentOption<VerticalAlignment>Read/WriteGets the vertical alignment.
wrap_textboolRead/WriteGets the wrap text.
indent_levelu8Read/WriteGets the indent level.
text_rotationu16Read/WriteGets the text rotation.
shrink_to_fitboolRead/WriteGets the shrink to fit.
reading_orderu8Read/WriteGets the reading order.
relative_indenti32Read/WriteGets the relative indent.
patternFillPatternRead/WriteGets the pattern.
background_colorOption<String>Read/WriteGets the background color.
fontFontRead/WriteGets the font.
fill_colorOption<String>Read/WriteGets the fill color.
bordersBordersRead/WriteGets the borders.
is_lockedboolRead/WriteGets the is locked.
is_hiddenboolRead/WriteGets the is hidden.
quote_prefixboolRead/WriteGets the quote prefix.

Methods

SignatureDescription
default()SelfCalls default on this CellStyle instance.
new()SelfInitializes 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()i32Gets 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()boolGets the associated value.
set_is_text_wrapped(value: bool)Sets the associated value.
get_indent_level()u8Gets the indentation level.
set_indent_level(value: u8)Sets the indentation level.
get_text_rotation()u16Gets the text rotation.
set_text_rotation(value: u16)Result<(), CellsError>Sets the text rotation.
get_shrink_to_fit()boolGets whether the cell content shrinks to fit.
set_shrink_to_fit(value: bool)Sets whether the cell content shrinks to fit.
get_reading_order()u8Gets the reading order.
set_reading_order(value: u8)Result<(), CellsError>Sets the reading order.
get_relative_indent()i32Gets the relative indent.
set_relative_indent(value: i32)Sets the relative indent.
get_is_locked()boolGets 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()boolGets 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()boolGets 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()&FontGets the font settings.
get_font()&FontGets the font settings.
get_font_mut()&mut FontGets 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()FillGets the associated value.
get_fill()FillGets the associated value.
set_fill(fill: Fill)Sets the associated value.
borders()&BordersGets border settings.
get_borders()&BordersGets border settings.
get_borders_mut()&mut BordersGets 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.

See Also