NativeExcel suite v3.x

IXLSBorder interface

Unit: nExcel
Represents the border of an object


IXLSRange object have four discrete borders - left, right, top, and bottom - which can be returned individually or as a group. Use the Borders property to return the Borders collection, which contains all four borders and treats the borders as a unit. Use Borders[Index], where index identifies the border, to return a single border.



The following example adds a double border to cell A1 on worksheet one.
Workbook.Worksheets[1].Range['A1', 'A1'].Borders.LineStyle := xlDouble;
The following example sets the color of the bottom border of cells A1:G1.
Workbook.Worksheets[1].Range['A1', 'G1'].Borders[xlEdgeBottom].Color := RGB(255, 0, 0);
Copyright © NikaSoft 2004-2013