[]
Gets or sets the color index applied to the outer and inside borders in the collection.
The value can be a palette color index or one of the special values defined by ColorDataIndex, such as Automatic or None. To set a diagonal border, use this[BordersIndex] with DiagonalDown or DiagonalUp.
int ColorIndex { get; set; }
Property ColorIndex As Integer
IBorders borders = worksheet.Range["B2:E6"].Borders;
borders.LineStyle = BorderLineStyle.DashDot;
borders.ColorIndex = (int)ColorDataIndex.Automatic;
ColorDataIndex colorIndex = (ColorDataIndex)borders.ColorIndex;