Border class

Border class

Encapsulates the object that represents the cell border.

The Border type exposes the following members:

Properties

PropertyDescription
theme_colorGets and sets the theme color of the border.
colorGets or sets the Color of the border.
argb_colorGets and sets the color with a 32-bit ARGB value.
line_styleGets or sets the cell border type.

Example

from aspose.cells import BorderType, CellBorderType, Workbook
from aspose.pydrawing import Color

workbook = Workbook()
sheets = workbook.worksheets
cell = sheets[0].cells.get("A1")
style = cell.get_style()
# Set top border style and color
border = style.borders.get(BorderType.TOP_BORDER)
border.line_style = CellBorderType.MEDIUM
border.color = Color.red
cell.set_style(style)

See Also