Get Started
Usage API

SetBorders

SetBorders(bordersIndex, lineStyle, oColor)

Set the border to the cell/cell range with the parameters specified.

Parameters:

Name Type Description
bordersIndex BordersIndex

Specifies the cell border position.

lineStyle LineStyle

Specifies the line style used to form the cell border.

oColor ApiColor

The color object previously created to set the color to the cell border.

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oWorksheet.SetColumnWidth(0, 50);
oWorksheet.GetRange("A2").SetBorders("Bottom", "Thick", Api.CreateColorFromRGB(49, 133, 154));
oWorksheet.GetRange("A2").SetValue("This is a cell with a bottom border");
builder.SaveFile("xlsx", "SetBorders.xlsx");
builder.CloseFile();

Resulting document