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

Area

Description

An=20 Area object represents a rectangular set of cells.=20
C#
=20
[DefaultMember("Item")]
 public sealed class Area
=20
=20
vb.net
=20
<DefaultMember("Item")> _
=09Public NotInheritable Class Area
=20
=20

Remarks

To create an=20 Area object, call=20 Worksheet.C= reateArea=20

Examples

=20
C#
=20
          ExcelApplication xla =3D new ExcelApplication();
          Workbook wb =3D xla.Create();
          Worksheet ws =3D wb.Worksheets[0];
          Area a =3D ws.CreateArea(4, 4, 15, 6);
        
=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)
        
=20

Properties

Name

Description

AllColumnWidths

Sets the width - in points (1/72 of an inch) - o= f all columns in the Area. When converted to character widths, this must be= a value that is between 0 - 255.

AllColumnWidthsInChars

Sets or returns the width of all columns in this= Area as a number of '0' characters in the font of the 'Normal' style. This= must be a value between 0 - 255.

= AllRowsHeight

Sets the height - in points (1/72 of an inch) - = of all rows in this Area. This must be a value that is between 0 - 409.

A= rrayFormula

Sets or returns an array entered formula. An arr= ay entered formula is a formula that can have multiple output values. To se= t an array entered formula, surround the formula string with a '{' and '}'.=

B= orderAround

Returns a Borde= r object that represents a border around the area. Use the Border= object returned to set the appearance of the border.

Co= lumnCount

Sets or returns the number of columns in the are= a.

Dim= ensions

Sets or returns the dimensions of the area in th= e format "A1:B7".

Fi= rstColumn

Sets or returns the 0-based number of the first = column within the rectangular area of cells.

First= Row

Sets or returns the 0-based number of the first = row within the rectangular area of cells.

PopulatedCells

Returns a rectanglular area of cells from the fi= rst (top, left) populated cell to the last (bottom, right) populated cell i= n the Area. The Area returned will include cells that contain no data but h= ave been formatted.

RowCo= unt

Sets or returns the number of rows in the area.<= /td>

WorksheetIndex

Returns the 0-based index of the worksheet that = contains the specified area, or -1 if the worksheet that contained the area= doesn't exist anymore.

Indexers

Name

Description

Item(Int32, Int32)

Returns a cell within the specified area of cell= s.

Methods

Name

Description

ApplyStyle(Style)

Applies a style to the area. When a style is app= lied - rather than set (see Area.SetStyle(Style) ) - only the differences between the new styl= e and style properties previously assigned to the area (through the ExcelWr= iter API or in Microsoft Excel) will take effect. For example, if the area = has a background color and the new style applied does not contain a backgro= und color, the area's color will not be affected. However, if the new style= includes background color, it will replace the existing background color o= f the area.

AutoFitHeight()

Sets the height of each of the rows within the a= rea to the height of the highest cell value in that row within the bounds o= f the Area.

AutoFitWidth()

Sets the width of each of the columns within the= area to the width of the widest cell value in that column within the bound= s of the Area.
CalculateFormulas()  Calculates any Calculation Engine Supported Formulas in the area. Any = formulas in the area that are not supported by the Calculation Engine will = be set as 0.

ClearContent()

Clears the content of all cells in the area. Cal= ling this method is equivalent to setting an area's cell values to null.

CreateHyperlink(String)

Creates a new hyperlink in the area pointing to = the specified href. This hyperlink is automatically added to the worksheet.= All cell values in the area will be converted to hyperlinks.

GetColumnWidth(Int32)

Returns the width - in points (1/72 of an inch) = - of the specified column. When converted to character widths, this must be= a value that is between 0 - 255.

GetColumnWidthInChars(Int32)

Sets or returns the width of the column as a num= ber of '0' characters in the font of the 'Normal' style. This must be a val= ue between 0 - 255.

GetRowHeight(Int32)

Returns the height - in points (1/72 of an inch)= - of the specified row. When converted to character widths, this must be a= value that is between 0 - 409.

GroupColumns(Boolean)

Groups or outlines the columns contained within = the area.

GroupRows(Boolean)

Groups or outlines the rows contained within the= area.

ImportData(Object()())

Imports data from a two-dimensional array of obj= ects to the specified Area . The new dat= a will overwrite values = and formulas in the target worksheet cells, but existing formatting will be= preserved.

ImportData(Object()(), String(), DataImportProperties)

Imports data from a two-dimensional array of obj= ects to the specified Area . The new dat= a will overwrite values = and formulas in the target worksheet cells, but existing formatting will be= preserved.

ImportData(System.Data.DataTable)

Imports data from an ADO.NET DataTable to the specified Area. The new data will overwrite values and formulas in the target worksheet cel= ls, but existing formatting will be preserved.

ImportData(System.Data.DataTable, DataImportProperties)

Imports data from an ADO.NET DataTable to the specified Area. The new data will overwrite values and formulas in the target worksheet cel= ls, but existing formatting will be preserved.

ImportData(System.Data.DataView)

Imports data from an ADO.NET DataView to the specified Area. The new data will overwrite values and formulas in the target worksheet cell= s, but existing formatting will be preserved.

ImportData(System.Data.DataView, DataImportProperties)

Imports data from an ADO.NET DataView to the specified Area. The new data will overwrite values and formulas in the target worksheet cell= s, but existing formatting will be preserved.

ImportData(Object(,))

Imports data from a rectangular array of objects= to the specified Area. The new data wil= l overwrite values and f= ormulas in the target worksheet cells, but existing formatting will be pres= erved.

ImportData(Object(,), String(), DataImportProperties)

Imports data from a rectangular array of objects= to the specified Area. The new data wil= l overwrite values and f= ormulas in the target worksheet cells, but existing formatting will be pres= erved.

ImportData(System.Data.IDataReader)

Imports data from an IDataReader to the specified Area. The new data will overwrite values and formulas in the target worksheet cells, bu= t existing formatting will be preserved.

ImportData(System.Data.IDataReader, DataImportProperties)

Imports data from an IDataReader to the specified Area. The new data will overwrite values and formulas in the target worksheet cells, bu= t existing formatting will be preserved.

MergeCells()

Merges all cells in the area into a single cell.=

RemoveConditionalFormat()

This method removes any ConditionalFormat object= s from the Area.

SetColumnWidth(Int32, Double)

Sets the width - in points (1/72 of an inch) - o= f the specified column. When converted to character widths, this must be a = value that is between 0 - 255.

SetColumnWidthInChars(Int32, Double)

Sets or returns the width of the column as a num= ber of '0' characters in the font of the 'Normal' style. This must be a val= ue between the 0 - 255.

SetConditionalFormat(ConditionalFormat)

This method copies the specified ConditionaForma= t object and associates it with this Area. If any ConditionalFormat objects= already exist within the Area, they will be removed and replaced by the sp= ecifed one.

SetDataValidation(DataValidation)

Assigns a data validation rule to all cells in t= he Area. If the DataValidation= object uses a local reference or area in a formula (i.e. "=3DA5:B7&qu= ot;), then the area will adjust those local references accordingly based on= the area's location. The original DataValidation object will = not be affected.

SetRowHeight(Int32, Double)

Sets the height - in points (1/72 of an inch) - = of the specified row. When converted to character widths, this must be a va= lue that is between 0 - 409.

SetStyle(Style)

Sets or returns a style for the area. When a sty= le is set - rather than applied (see Area.ApplyStyle) - the area to which the style is assigne= d acquires all of that style's properties, including font properties and nu= mber formatting. Setting a style overwrites any pre-existing formatting on = the area.

ToString()

Returns a string representation of the Area object.

UngroupColumns()

Ungroups the columns within the area.

UngroupRows()

Ungroups the rows within the area.

Extension Methods

 

Overload

Description

ImportData(Microsoft.SharePoint.SPList, DataImportProperties)

Imports data from a SharePoint List to the speci= fied Area. The new data will overwrite v= alues and formulas in the target worksheet cells, but existing formatting w= ill be preserved.

ImportData(Microsoft.SharePoint.SPList)

Imports data from a SharePoint List to the speci= fied Area. The new data will overwrite v= alues and formulas in the target worksheet cells, but existing formatting w= ill be preserved.

ImportData(Microsoft.SharePoint.SPView, Microsoft.SharePoint.SPList,= DataImportProperties)

Imports data from a SharePoint View to the speci= fied Area. The new data will overwrite v= alues and formulas in the target worksheet cells, but existing formatting w= ill be preserved.

ImportData(Microsoft.SharePoint.SPView, Microsoft.SharePoint.SPList)=

Imports data from a SharePoint View to the speci= fied Area. The new data will overwrite v= alues and formulas in the target worksheet cells, but existing formatting w= ill be preserved.

------=_Part_9922_1357532948.1711706969150--