
## BorderCollection class

Encapsulates a collection of Border objects.

## Properties

| Name | Type | Description |
| --- | --- | --- |
| [DiagonalColor](#diagonalcolor) | Color | Gets or sets the com.aspose.cells.Color of Diagonal lines. |
| [DiagonalStyle](#diagonalstyle) | Number | Gets or sets the style of Diagonal lines. The value of the property is CellBorderType integer constant. |
| [Item ByBorderType(int)](#itembybordertypeint) | Border | Gets the Border element at the specified index. |

## Methods

| Name | Description |
| --- | --- |
| [setColor](#setcolor) | Sets the com.aspose.cells.Color of all borders in the collection. |
| [setStyle](#setstyle) | Sets the style of all borders of the collection. |

### BorderCollection.DiagonalColor property {#diagonalcolor}

Gets or sets the com.aspose.cells.Color of Diagonal lines.

**Type:** Color

### BorderCollection.DiagonalStyle property {#diagonalstyle}

Gets or sets the style of Diagonal lines. The value of the property is CellBorderType integer constant.

**Type:** Number

### BorderCollection.Item ByBorderType(int) property {#itembybordertypeint}

Gets the Border element at the specified index.

**Type:** Border

### setColor(color) {#setcolor}

Sets the com.aspose.cells.Color of all borders in the collection.

| Parameter | Type | Description |
| --- | --- | --- |
| color | Color | Borders' com.aspose.cells.Color . |

### setStyle(style) {#setstyle}

Sets the style of all borders of the collection.

| Parameter | Type | Description |
| --- | --- | --- |
| style | Number | A CellBorderType value. Borders' style |
