CellStyleFlag module

class CellStyleFlag.CellStyleFlag

Bases: SpireObject

Represents flags that control which aspects of a cell style are applied.

This class provides a set of boolean properties that determine which formatting elements of a cell style should be applied when copying styles between cells or when applying styles to ranges. Each property corresponds to a specific formatting aspect such as borders, font properties, alignment, etc.

property All: bool

Gets or sets whether all style elements should be applied.

When set to True, all formatting elements of the style will be applied. When set to False, only the specifically enabled elements will be applied.

Returns:

True if all style elements should be applied; otherwise, False.

Return type:

bool

property Borders: bool

Gets or sets whether all border style elements should be applied.

When set to True, all border formatting (left, right, top, bottom, and diagonal borders) will be applied.

Returns:

True if all border style elements should be applied; otherwise, False.

Return type:

bool

property BottomBorder: bool

Gets or sets whether the bottom border style should be applied.

When set to True, the bottom border formatting (style, color, etc.) will be applied.

Returns:

True if the bottom border style should be applied; otherwise, False.

Return type:

bool

property CellShading: bool

Gets or sets whether the cell shading should be applied.

When set to True, the cell shading formatting (background color and pattern) will be applied.

Returns:

True if the cell shading should be applied; otherwise, False.

Return type:

bool

property DiagonalDownBorder: bool

Gets or sets whether the diagonal down border style should be applied.

When set to True, the diagonal down border formatting (style, color, etc.) will be applied. Diagonal down borders run from the top-left to the bottom-right of a cell.

Returns:

True if the diagonal down border style should be applied; otherwise, False.

Return type:

bool

property DiagonalUpBorder: bool

Gets or sets whether the diagonal up border style should be applied.

When set to True, the diagonal up border formatting (style, color, etc.) will be applied. Diagonal up borders run from the bottom-left to the top-right of a cell.

Returns:

True if the diagonal up border style should be applied; otherwise, False.

Return type:

bool

property Font: bool

Gets or sets whether all font style elements should be applied.

When set to True, all font formatting (size, name, color, bold, italic, etc.) will be applied.

Returns:

True if all font style elements should be applied; otherwise, False.

Return type:

bool

property FontBold: bool

Gets or sets whether the font bold style should be applied.

When set to True, the bold formatting of the font will be applied.

Returns:

True if the font bold style should be applied; otherwise, False.

Return type:

bool

property FontColor: bool

Gets or sets whether the font color should be applied.

When set to True, the font color formatting will be applied.

Returns:

True if the font color should be applied; otherwise, False.

Return type:

bool

property FontItalic: bool

Gets or sets whether the font italic style should be applied.

When set to True, the italic formatting of the font will be applied.

Returns:

True if the font italic style should be applied; otherwise, False.

Return type:

bool

property FontName: bool

Gets or sets whether the font name should be applied.

When set to True, the font name (typeface) formatting will be applied.

Returns:

True if the font name should be applied; otherwise, False.

Return type:

bool

property FontScript: bool

Gets or sets whether the font script style should be applied.

When set to True, the script formatting (superscript or subscript) of the font will be applied.

Returns:

True if the font script style should be applied; otherwise, False.

Return type:

bool

property FontSize: bool

Gets or sets whether the font size should be applied.

When set to True, the font size formatting will be applied.

Returns:

True if the font size should be applied; otherwise, False.

Return type:

bool

property FontStrike: bool

Gets or sets whether the font strikethrough style should be applied.

When set to True, the strikethrough formatting of the font will be applied.

Returns:

True if the font strikethrough style should be applied; otherwise, False.

Return type:

bool

property FontUnderline: bool

Gets or sets whether the font underline style should be applied.

When set to True, the underline formatting of the font will be applied.

Returns:

True if the font underline style should be applied; otherwise, False.

Return type:

bool

property HideFormula: bool

Gets or sets whether the formula hiding should be applied.

When set to True, the formula hiding formatting (whether formulas are hidden when the sheet is protected) will be applied.

Returns:

True if the formula hiding should be applied; otherwise, False.

Return type:

bool

property HorizontalAlignment: bool

Gets or sets whether the horizontal alignment should be applied.

When set to True, the horizontal alignment formatting (left, center, right, etc.) will be applied.

Returns:

True if the horizontal alignment should be applied; otherwise, False.

Return type:

bool

property Indent: bool

Gets or sets whether the text indentation should be applied.

When set to True, the text indentation level formatting will be applied.

Returns:

True if the text indentation should be applied; otherwise, False.

Return type:

bool

property LeftBorder: bool

Gets or sets whether the left border style should be applied.

When set to True, the left border formatting (style, color, etc.) will be applied.

Returns:

True if the left border style should be applied; otherwise, False.

Return type:

bool

property Locked: bool

Gets or sets whether the cell locking should be applied.

When set to True, the cell locking formatting (whether the cell is locked when the sheet is protected) will be applied.

Returns:

True if the cell locking should be applied; otherwise, False.

Return type:

bool

property NumberFormat: bool

Gets or sets whether the number format should be applied.

When set to True, the number format (such as currency, date, percentage, etc.) will be applied.

Returns:

True if the number format should be applied; otherwise, False.

Return type:

bool

property RightBorder: bool

Gets or sets whether the right border style should be applied.

When set to True, the right border formatting (style, color, etc.) will be applied.

Returns:

True if the right border style should be applied; otherwise, False.

Return type:

bool

property Rotation: bool

Gets or sets whether the text rotation should be applied.

When set to True, the text rotation formatting (angle of text) will be applied.

Returns:

True if the text rotation should be applied; otherwise, False.

Return type:

bool

property ShrinkToFit: bool

Gets or sets whether the shrink to fit formatting should be applied.

When set to True, the shrink to fit formatting (whether text should be shrunk to fit in the cell) will be applied.

Returns:

True if the shrink to fit formatting should be applied; otherwise, False.

Return type:

bool

property TextDirection: bool

Gets or sets whether the text direction should be applied.

When set to True, the text direction formatting (left-to-right or right-to-left) will be applied.

Returns:

True if the text direction should be applied; otherwise, False.

Return type:

bool

property TopBorder: bool

Gets or sets whether the top border style should be applied.

When set to True, the top border formatting (style, color, etc.) will be applied.

Returns:

True if the top border style should be applied; otherwise, False.

Return type:

bool

property VerticalAlignment: bool

Gets or sets whether the vertical alignment should be applied.

When set to True, the vertical alignment formatting (top, middle, bottom, etc.) will be applied.

Returns:

True if the vertical alignment should be applied; otherwise, False.

Return type:

bool

property WrapText: bool

Gets or sets whether the text wrapping should be applied.

When set to True, the text wrapping formatting (whether text wraps within the cell) will be applied.

Returns:

True if the text wrapping should be applied; otherwise, False.

Return type:

bool