NativeExcel suite v2.x

IXLSBorders interface

Unit: nExcel
Collection of four IXLSBorder objects that represent the four borders of a IXLSRange object. Use the Borders property to return the Borders collection, which contains all four borders. Use Borders[index], where index identifies the border, to return a single IXLSBorder object.

Properties

Example

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 to red.
Workbook.Worksheets[1].Range['A1','G1'].Borders[xlEdgeBottom].Color := RGB(255, 0, 0);
Copyright © NikaSoft 2004-2012