Message-ID: <1606021516.9451.1711691433987.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_9450_1374679306.1711691433987" ------=_Part_9450_1374679306.1711691433987 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
A Range object represents a range in = a workbook.
=20[DefaultMember("Item")] public sealed class Range=20
<DefaultMember("Item")> _ =09Public NotInheritable Class Range=20
A range is a collection of areas. An area is a rectangular collection of= cells. The areas in a range may be non-adjacent, and a range can include a= reas in different worksheets.
=20To create a Range
(without a name), call one of the followi=
ng methods:
If a range is named, it will be accessible when the workbook is opened i= n Microsoft Excel. To create a named range, call one of the following metho= ds:
=20ExcelApplication xla =3D new ExcelApplication(); Workbook wb =3D xla.Create(); wb.Worksheets.CreateWorksheet("Sheet2"); Range rng =3D wb.CreateRange("=3DSheet1!A1:A3, Sheet2!A2:C5&= quot;);=20
Dim xla As New ExcelApplication() Dim wb As Workbook =3D xla.Create() wb.Worksheets.CreateWorksheet("Sheet2") Dim rng As Range =3D wb.CreateRange("=3DSheet1!A1:A3, Sheet2= !A2:C5")=20
Name | =20
Description | =20
---|---|
=20 | Returns the number of Area objects contained in this Range= . | =20
=20 | Returns an array of the rectangular areas contai= ned in the Range. | =20
=20 | Returns a Border= object that represents a border around the range. | =20
=20 | Returns the style for the first cell in the rang= e. Changes to this style will apply only to the first cell. To assign this style to the entire Range, set Range.SetStyle() to this Style reference. | =20
Name | =20
Description | =20
---|---|
=20 | Returns the Area= a> object at the specified 0-based index. | =20
Name | =20
Description | =20
---|---|
=20 | Applies a style to the area. When a style is app= lied - rather than set (see Range.SetStyle ) - only the differences between the new style and = style properties previously assigned to the range (through the ExcelWriter = API) will take effect. For example, if the range has a background color and= the new style applied does not contain a background color, the area's colo= r will not be affected. | =20
=20 | Clears the content of all cells in the range. Ca= lling this method is equivalent to setting an range's style to "Normal= " and its cell values to null. | =20
=20 | Adds another range to this range. | =20
=20 | This method removes any ConditionalFormat object= s from the Range. | =20
=20 | This method copies the specified ConditionaForma= t object and associates it with this Range. If any ConditionalFormat object= s already exist within the Range, they will be removed and replaced by the = specifed one. | =20
=20 | Assigns a data validation rule to all cells in t=
he Range. If the DataValidation=
object uses a local reference or area in a formula (i.e. "=3DA5:B7&qu=
ot;), then the range will adjust those local references accordingly based o=
n the range's location. The original DataValidation object wil=
l not be affected. | =20
=20 | Sets the style for every cell in this range. Whe= n a style is set - rather than applied (see Range.ApplyStyle ) - all previously assigned style= properties, including font and number formatting, will be overwritten for = all cells in the range. | =20
=20 | Returns a string representation of the Range object. | =20