Represents the border of an object. The IBorder interface is a member of the IBorders collection.
For a list of all members of this type, see IBorder Members.
[Visual Basic] Public Interface IBorder [C#] public interface IBorder [C++] public __gc __interface IBorder [JScript] public interface IBorder
The following example adds a double red border to cell A1 on worksheet one.
[C#]
IBorder border = book.Worksheets[1].Range["A1"].Borders[XlBordersIndex.xlAround];
border.LineStyle = XlLineStyle.xlDouble;
border.Color = System.Drawing.Color.Red;
[Visual Basic]
Dim border As IBorder = book.Worksheets(1).Range("A1").Borders(XlBordersIndex.xlAround)
border.LineStyle = XlLineStyle.xlDouble
border.Color = System.Drawing.Color.Red
[C++]
IRange* range = book->Worksheets->Item[1]->Range->Item[S"A1"];
IBorder* border = range->Borders->Item[XlBordersIndex::xlAround];
border->LineStyle = XlLineStyle::xlDouble;
border->Color = System::Drawing::Color::Red;
Namespace: NativeExcel
Assembly: NativeExcel (in NativeExcel.dll)
IBorder Members | NativeExcel Namespace | IRange.Borders Property | IBorders Interface