.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
Row

IRangeProvider.Parse(String, ReferenceStyle) Method

Returns a cell range by its reference string in the specified reference style.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v21.1.Core.dll

Declaration

CellRange Parse(
    string reference,
    ReferenceStyle style
)

Parameters

Name Type Description
reference String

A string that is the cell range reference in the reference style specified by the style parameter.

If the specified reference is invalid, the System.InvalidOperationException is thrown.

style ReferenceStyle

A ReferenceStyle enumeration member that specifies the cell reference style.

Returns

Type Description
CellRange

A CellRange object.

Remarks

Get the IRangeProvider object via the Worksheet.Range property and use the Parse method to access a cell range object. The second parameter specifies the reference style in which the cell range reference should be passed. If you skip this parameter or set it to ReferenceStyle.A1, the cell range reference (the reference parameter) should be in the A1 reference style. You can also use the IRangeProvider.Item or Worksheet.Item property to get a cell range by its A1 reference. If you need to get a cell range by its R1C1 reference or by its reference in the style used in the workbook (DocumentSettings.R1C1ReferenceStyle), set the style parameter to ReferenceStyle.R1C1 or ReferenceStyle.UseDocumentSettings, respectively.

To get a cell range by the indexes of the bounding rows and columns, use the IRangeProvider.FromLTRB method.

­SpreadsheetControl_Range_Access

See Also