Border

Border class

Encapsulates the object that represents the cell border.

class Border;

Example

const { Workbook, BorderType, CellBorderType, Color } = AsposeCells;

var workbook = new Workbook();
var worksheet = workbook.worksheets.get(0);
var cell = worksheet.cells.get(0, 0);
var style = workbook.createStyle();
//Set top border style and color
var border = style.borders.get(BorderType.TopBorder);
border.lineStyle = CellBorderType.Medium;
border.color = Color.Red;
cell.setStyle(style);

Properties

PropertyTypeDescription
themeColorThemeColorGets and sets the theme color of the border.
colorColorGets or sets the Color of the border.
argbColornumberGets and sets the color with a 32-bit ARGB value.
lineStyleCellBorderTypeGets or sets the cell border type.

themeColor

Gets and sets the theme color of the border.

themeColor : ThemeColor;

color

Gets or sets the Color of the border.

color : Color;

argbColor

Gets and sets the color with a 32-bit ARGB value.

argbColor : number;

lineStyle

Gets or sets the cell border type.

lineStyle : CellBorderType;