The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
Row

Worksheet.GetDataRange() Method

Gets the worksheet range that encompasses all cells containing data and formulas.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v19.2.Core.dll

Declaration

CellRange GetDataRange()
Function GetDataRange As CellRange
CellRange GetDataRange()
Function GetDataRange As CellRange
CellRange GetDataRange()
Function GetDataRange As CellRange

Returns

Type Description
CellRange

A CellRange which contains all nonempty cells in a worksheet.

Returns

Type Description
CellRange

A CellRange which contains all nonempty cells in a worksheet.

Returns

Type Description
CellRange

A CellRange which contains all nonempty cells in a worksheet.

Remarks

The GetDataRange method returns a worksheet range that meets the following requirements.

  • The data range is a continuous range of nonempty cells. The top-left cell of the data range is a cell located at the intersection of the topmost row and the leftmost column containing non-empty cells. The bottom-right cell of the data range is a cell located at the intersection of the lowest row and the rightmost column containing nonempty cells. If a nonempty cell is located in the hidden row or column, it is still included in the data range.

    Note

    The cell is not empty if it contains a value (CellRange.Value) or a formula (CellRange.Formula).

    Spreadsheet_GetDataRange_B2E6

  • Empty cells containing visual formatting or conditional formatting are not included in the data range.

    Spreadsheet_GetDataRange_B2E6_FormattedCells

  • The data range is extended to include merged cells containing data. If merged cells are empty, they are ignored.

    Spreadsheet_GetDataRange_B2F9_MergedCells

  • Tables are included in the data range. If a table contains empty rows below all non-empty cells, these rows are excluded from the data range.

    Spreadsheet_GetDataRange_B2E6_Table

  • Pictures, charts and comments are not included in the data range.

    Spreadsheet_GetDataRange_B3E7_Pictures

See Also