AddtionalFormatWrapper module

class AddtionalFormatWrapper.AddtionalFormatWrapper

Bases: CommonWrapper, IInternalAddtionalFormat, IExtendIndex, IStyle

Represents a wrapper for additional formatting in Excel.

This class extends CommonWrapper and implements multiple interfaces to provide comprehensive formatting capabilities for Excel worksheets. It serves as a base for various formatting classes and includes properties and methods for managing borders, colors, alignment, fonts, and other formatting aspects.

property BackgroundColor: Color

Gets or Sets fill background color.

property BackgroundKnownColor: ExcelColors

Gets or Sets index of fill background excel color.

BeginUpdate()

Begins a batch update operation.

This method marks the beginning of a series of changes to the formatting properties. Changes made between BeginUpdate and EndUpdate are applied together for better performance.

property Borders: IBorders
property BottomBorderColor: OColor

Gets or sets bottom border color.

property BottomBorderLineStyle: LineStyleType

Gets or sets line style of the bottom border.

property BuiltIn: bool

Gets whether the format is a built-in format.

Returns:

True if the format is a built-in format; False if it is a custom format.

Return type:

bool

Clone(parent: SpireObject) SpireObject

Creates a copy of the current formatting with the specified parent.

Parameters:

parent (SpireObject) – The parent object for the cloned formatting.

Returns:

A new object that is a copy of this formatting.

Return type:

SpireObject

property Color: Color

Gets or sets the cell shading color.

property DiagonalBorderColor: OColor

Gets or sets diagonal border color.

property DiagonalDownBorderLineStyle: LineStyleType

Gets or sets line style of the diagonal border.

property DiagonalDownVisible: bool

Indicates whether diagonal down line is visible.

property DiagonalUpBorderLineStyle: LineStyleType

Gets or sets line style of the diagonal border.

property DiagonalUpVisible: bool

Indicates whether DiagonalUp line is visible.

EndUpdate()

Ends a batch update operation.

This method completes the batch update started with BeginUpdate and applies all pending changes to the formatting properties.

property ExtendedFormatIndex: int

Gets extended format index.

property FillPattern: ExcelPatternType

Gets or Sets fill pattern type.

property Font: IFont
property ForegroundColor: Color

Gets or Sets fill foreground color.

property ForegroundKnownColor: ExcelColors

Gets or Sets fill foreground excel color.

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

Gets whether the format has been initialized.

Returns:

True if the format has been initialized; False otherwise.

Return type:

bool

property IsModified: bool
property JustifyLast: bool

Represents justify text alignment

property KnownColor: ExcelColors

Gets or sets the cell shading excel color.

property LeftBorderColor: OColor

Gets or sets left border color.

property LeftBorderLineStyle: LineStyleType

Gets or sets line style of the left border.

property Locked: bool

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

property Name: str

Gets the name of the format.

Returns:

The name of the format.

Return type:

str

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 Parent: SpireObject

Gets the parent object of the format.

Returns:

The parent object that contains this format.

Return type:

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 RightBorderColor: OColor

Gets or sets right border color.

property RightBorderLineStyle: LineStyleType

Gets or sets line style of the right border.

property Rotation: int

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

SetBackgroundThemeColor(type: ThemeColorType, tint: int)

Sets the background theme color for the formatting.

Parameters:
  • type (ThemeColorType) – The theme color type to set for the background.

  • tint (int) – The tint value to apply to the theme color.

SetThemeColor(type: ThemeColorType, tint: float)

Sets the theme color for the formatting.

Parameters:
  • type (ThemeColorType) – The theme color type to set.

  • tint (float) – The tint value to apply to the theme color (between -1.0 and 1.0).

property ShrinkToFit: bool

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

property TopBorderColor: OColor

Gets or sets top border color.

property TopBorderLineStyle: LineStyleType

Gets or sets line style of the top border.

property VerticalAlignment: VerticalAlignType

Returns or sets the vertical alignment of the specified object.

property Workbook: XlsWorkbook

Gets the workbook that contains this format.

Returns:

The workbook object that contains this format.

Return type:

XlsWorkbook

property WrapText: bool

True if Microsoft Excel wraps the text in the object.