Version

GetRegions(String) Method

Gets the regions at the specified address or name.
Syntax
'Declaration
 
Public Overloads Function GetRegions( _
   ByVal address As String _
) As WorksheetRegion()
public WorksheetRegion[] GetRegions( 
   string address
)

Parameters

address
The address or name of the region.

Return Value

An array of regions represented by the specified address or name.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionaddress is null.
System.ArgumentExceptionaddress is not a valid name or a valid cell or region address in the workbook's cell reference mode.
System.InvalidOperationExceptionaddress is a relative R1C1 address. The overload taking an origin cell must be used to resolve relative R1C1 references.
Remarks

The CellReferenceMode of the workbook will be used to parse the region address.

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.

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: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also