Style

Overview

Style is a class in Aspose.Cells for Python.

Represents formatting settings for a cell or range of cells.

Methods

SignatureDescription
__init__()Initializes a new instance of Style class with default formatting.
copy()Creates a deep copy of this Style object.
set_fill_color(color)Sets the cell fill color using a solid fill pattern.
set_fill_pattern(pattern_type, fg_color, bg_color)Sets the cell fill pattern and colors.
set_no_fill()Removes the cell fill (transparent background).
set_border_color(side, color)Sets the border color for a specific side.
set_border_style(side, style)Sets the border line style for a specific side.
set_border_weight(side, weight)Sets the border line weight for a specific side.
set_border(side, line_style, color, weight)Sets complete border properties for a specific side.
set_diagonal_border(line_style, color, weight, up, down)Sets diagonal border properties.
set_horizontal_alignment(alignment)Sets the horizontal alignment of cell content.
set_vertical_alignment(alignment)Sets the vertical alignment of cell content.
set_text_wrap(wrap)Sets whether text wraps within the cell.
set_shrink_to_fit(shrink)Sets whether text shrinks to fit the cell width.
set_indent(indent)Sets the indent level for cell content.
set_text_rotation(rotation)Sets the text rotation angle.
set_reading_order(order)Sets the reading order for cell content.
set_number_format(format_code)Sets the number format code for the cell.
set_builtin_number_format(format_id)Sets the number format using a built-in format ID.
set_locked(locked)Sets whether the cell is locked when the worksheet is protected.
set_formula_hidden(hidden)Sets whether the cell’s formula is hidden when the worksheet is protected.