NativeExcel2 for .Net Developer's Reference

IBorders.LineStyle Property

Returns or sets the line style for the borders. Read/write XlLineStyle.

[Visual Basic]
PropertyLineStyleAsXlLineStyle
[C#]
XlLineStyleLineStyle{get;set;}
[C++]
__propertyXlLineStyleget_LineStyle();
__propertyvoidset_LineStyle(XlLineStyle);
[JScript]
functiongetLineStyle():XlLineStyle
functionsetLineStyle(XlLineStyle);

Example

This example puts a borders for the A1:C5 range.

[C#]
IBorders borders = book.Worksheets[1].Range["A1:C5"].Borders;
borders.LineStyle    = XlLineStyle.xlDot;
[VisualBasic]
Dim borders As IBorders = book.Worksheets(1).Range("A1:C5").Borders
borders.LineStyle    = XlLineStyle.xlDot
[C++]
IBorders* borders = book->Worksheets->Item[1]->Range->Item[S"A1:C5"]->Borders;
borders->LineStyle    = XlLineStyle::xlDot;

See Also

IBorders Interface | NativeExcel Namespace | XlLineStyle Enumeration | IRange.Borders Property | IBorders Interface