Version

GetRegions(String,CellReferenceMode,WorksheetCell) Method

Gets the regions at the specified address or name.
Syntax

Parameters

address
The address or name of the region.
cellReferenceMode
The cell reference mode to use to parse the region address.
originCell
The origin for resolving relative R1C1 references.

Return Value

An array of regions represented by the specified address or name.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionaddress is null.
System.ComponentModel.InvalidEnumArgumentExceptioncellReferenceMode is not defined in the CellReferenceMode enumeration.
System.ArgumentExceptionaddress is not a valid name or a valid cell or region address in the specified cell reference mode.
System.InvalidOperationExceptionaddress is a relative R1C1 address and originCell is null. An origin cell must be specified to resolve relative R1C1 references.
Remarks

The address can be a list of references, each one referring to a separate region on the Worksheet.

If a cell or single region reference is specified instead, an array of one region at the address will be returned.

The origin cell specified will not be used if a name is specified, if the workbook has an A1 cell reference mode, or if an absolute R1C1 address is specified.

If a name is specified, it must refer to cells or regions in the Worksheet and it must be scoped to the Workbook or the Worksheet or null will be returned.

Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also