CellStyleObject module

class CellStyleObject.CellStyleObject

Bases: SpireObject, IStyle

BeginUpdate()
property Borders: IBorders
property BuiltIn: bool

True if the style is a built-in style.

property Color: Color

Gets or sets the cell shading color.

EndUpdate()
property FillPattern: ExcelPatternType

Gets or Sets fill pattern type.

property Font: IFont
property FormulaHidden: bool

True if the formula will be hidden when the worksheet is protected.

property HorizontalAlignment: HorizontalAlignType

Returns or sets the horizontal alignment for the specified object.

property IncludeAlignment: bool

True if the style includes the AddIndent, HorizontalAlignment, VerticalAlignment, WrapText, and Orientation properties.

property IncludeBorder: bool

True if the style includes the Color, KnownColor, LineStyle, and Weight border properties

property IncludeFont: bool

True if the style includes the Background, Bold, Color, KnownColor, FontStyle, Italic, Name, OutlineFont, Shadow, Size, Strikethrough, Subscript, Superscript, and Underline font properties.

property IncludeNumberFormat: bool

True if the style includes the NumberFormat property.

property IncludePatterns: bool

True if the style includes the Color, KnownColor, InvertIfNegative, Pattern, PatternColor, and PatternKnownColor interior properties.

property IncludeProtection: bool

True if the style includes the FormulaHidden and Locked protection properties.

property IndentLevel: int

Returns or sets the indent level for the style.

property Interior: IInterior
property IsFirstSymbolApostrophe: bool

If true then first symbol in cell is apostrophe.

property IsInitialized: bool
property IsModified: bool
property JustifyLast: bool

Represents justify text alignment

property KnownColor: ExcelColors

Gets or sets the cell shading excel color.

property Locked: bool

True if the object is locked; False if the object can be modified when the sheet is protected.

property Name: str

Returns or sets the name of the object. Read-only String.

property NumberFormat: str

Returns or sets the format code for the object.

property NumberFormatIndex: int

Gets or Sets format index.

property NumberFormatLocal: str

Returns or sets the format code for the object as a string in the language of the user.

property NumberFormatSettings: INumberFormat
property Parent: SpireObject
property PatternColor: Color

Returns or sets the color of the interior pattern.

property PatternKnownColor: ExcelColors

Returns or sets the excel color of the interior.

property ReadingOrder: ReadingOrderType

Returns or sets the reading order for the specified object.

property Rotation: int

The text orientation. Can be an integer value from 1 to 180 degrees

SetThemeColor(type: ThemeColorType, tint: float)

Set the theme color.

Parameters:
  • type – theme color type

  • tint

property ShrinkToFit: bool

True if text automatically shrinks to fit in the available column width.

property VerticalAlignment: VerticalAlignType

Returns or sets the vertical alignment of the specified object.

property WrapText: bool

True if Microsoft Excel wraps the text in the object.