Message-ID: <401683231.9445.1711691335171.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_9444_1648681096.1711691335171" ------=_Part_9444_1648681096.1711691335171 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Workbook.CreateNamedRange(Area(), String)

Workbook.CreateNamedRange(Area(), String)

Des= cription

=20

Creates a Range of cells from an arra= y of Areas. A Range is a collection of Area s; an Area area is a rectangular collection of= cells.

=20
C#
=20
 public Range CreateNamedRange(Area[] rangeAreas, System.String rangeName)
=20
=20
vb.net
=20
Public Function CreateNamedRange(ByVal rangeAreas As Area(), ByVal rangeNam=
e As String) As Range
=20
=20

Parameters=20

rangeAreas Array or Areas representing the range.=20
rangeName The name to assign to the range.=20

Returns

A= =20 Range object representing the range of cells created.=20

Remarks

No= te that if a range named=20 rangeName already exists in the workbook, it will be overwritt= en with the new named range created by this method.=20

Examples

= =20
C#
=20

          Range rng =3D wb.CreateNamedRange(
               new Area[]{
               worksheet1.CreateArea(2, 4, 2, 5),
               worksheet2.CreateArea(2, 4, 2, 5)},
               "MyRange");
        
=20
=20
vb.net
=20

          Dim rng As Range =3D wb.CreateNamedRange( _
               New Area(){ _
               worksheet1.CreateArea(2, 4, 2, 5), _
               worksheet2.CreateArea(2, 4, 2, 5)}, _
               "MyRange")
        
=20
------=_Part_9444_1648681096.1711691335171--