Message-ID: <1260581205.9851.1711705030694.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_9850_893337226.1711705030694" ------=_Part_9850_893337226.1711705030694 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Border

Border

Description

=20

A Border object represents a border= around a cell or area of cells.

=20
C#
=20
[DefaultMember("Item")]
 public sealed class Border
=20
=20
vb.net
=20
<DefaultMember("Item")> _
=09Public NotInheritable Class Border
=20
=20

Remarks

=20

To set a border around a single cell, set the Border.Color and Border.Style of a Border o= bject retrieved through the cell's Style:

=20
=20
cellB2.Style.Border.Style =3D Border.LineStyle.Thick;
=20
=20
=20
cellB2.Style.Border.Color =3D Palette.SystemColor.Blue;
=20
=20

You can also define part of a cell's border using Border.Item(Border.Part)= :

=20
=20
cellB2.Style.Border[Border.Part.Outline].Color =3D Palette.SystemColor.Blue=
;
=20
=20

To return a Border object for an Area, use Area.BorderAround.

=20

Examples

=20
C#
=20

          ExcelApplication xla =3D new ExcelApplication();
          Workbook wb =3D xla.Create();
          Worksheet ws =3D wb[0];
          Area a =3D ws.CreateArea(4, 4, 15, 6);
          Border b =3D a.BorderAround;
        
=20
=20
vb.net
=20

          Dim xla As New ExcelApplication()
          Dim wb As Workbook =3D xla.Create()
          Dim ws As Worksheet =3D wb(0)
          Dim a As Area =3D ws.CreateArea(4, 4, 15, 6)
          Dim b As Border =3D a.BorderAround
        
=20
=20

Properties

=20
=20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20

Name

Description

Color<= /a>

Sets or returns the color of the border, as an E= xcelWriter Color object. = If multiple colors were assigned to border parts, Color will r= eturn the color of the top border.

Style<= /a>

Sets or returns the border's line style.
=20

Indexers

=20
=20 =20 =20 =20 =20 =20 =20 = =20 =20

Name

Description

Item(Border.Part)

Returns a BorderPart object representing the spe= cified part of the border. This is the indexer for the Border object.
=20

Nested Classes

=20
=20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20

Name

Description

Li= neStyle

Use the LineStyle class to set a line style for a Border or BorderPart.=20

Part

Use the Pa= rt class to set a color or line style for a specific part of a border.<= /td>=20
------=_Part_9850_893337226.1711705030694--