SetBorders
Sets the border to the cell / cell range with the parameters specified.
Syntax
expression.SetBorders(bordersIndex, lineStyle, oColor);
expression
- A variable that represents a ApiRange class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
bordersIndex | Required | BordersIndex | Specifies the cell border position. | |
lineStyle | Required | LineStyle | Specifies the line style used to form the cell border. | |
oColor | Required | ApiColor | The color object which specifies the color to be set to the cell border. |
Returns
This method doesn't return any data.
Example
This example sets the border to the cell with the parameters specified.
var oWorksheet = Api.GetActiveSheet();
oWorksheet.SetColumnWidth(0, 50);
oWorksheet.GetRange("A2").SetBorders("Bottom", "Thick", Api.CreateColorFromRGB(255, 111, 61));
oWorksheet.GetRange("A2").SetValue("This is a cell with a bottom border");