NativeExcel2 for .Net Developer's Reference

IBorders.Weight Property

Returns or sets the weight of the borders. Read/write XlBorderWeight.

[Visual Basic]
PropertyWeightAsXlBorderWeight
[C#]
XlBorderWeightWeight{get;set;}
[C++]
__propertyXlBorderWeightget_Weight();
__propertyvoidset_Weight(XlBorderWeight);
[JScript]
functiongetWeight():XlBorderWeight
functionsetWeight(XlBorderWeight);

Example

This example sets the weight of borders for the A1:C5 range.

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

See Also

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