CellStyle module

class CellStyle.CellStyle

Bases: CellStyleObject

Represents a style for cells in an Excel worksheet.

This class extends CellStyleObject and provides properties and methods for defining and manipulating cell styles in Excel worksheets. It allows for accessing and modifying borders, fonts, and interior formatting, as well as cloning styles for reuse across multiple cells or worksheets.

property Borders: BordersCollection

Returns a Borders collection that represents the borders of a style.

property Font: ExcelFont

Returns a Font object that represents the font of the specified object.

property Interior: ExcelInterior

Returns interior object for extended format.

clone

Creates a copy of the current cell style.

This method creates a new CellStyle object with the same formatting attributes as the current style.

Returns:

A new CellStyle object that is a copy of the current style.

Return type:

CellStyle