PHPExcel classes » \PHPExcel_NamedRange

PHPExcel_NamedRange

category | PHPExcel
package | PHPExcel
copyright | Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

### Methods

## Implement PHP __clone to create a deep clone, not just a shallow copy.

    __clone()

## Create a new NamedRange

    __construct(string $pName, \PHPExcel_Worksheet $pWorksheet, string $pRange, bool $pLocalOnly, \PHPExcel_Worksheet | null $pScope)

### Parameters

#### $pName

`string`

#### $pWorksheet

`\PHPExcel_Worksheet`

#### $pRange

`string`

#### $pLocalOnly

`bool`

#### $pScope

`\PHPExcel_Worksheet` `null`

Scope. Only applies when $pLocalOnly = true. Null for global scope.

### Exceptions

`\PHPExcel_Exception` |

## Get localOnly

    getLocalOnly() : bool

### Returns

`bool`

## Get name

    getName() : string

### Returns

`string`

## Get range

    getRange() : string

### Returns

`string`

## Get scope

    getScope() : \PHPExcel_Worksheet | null

### Returns

`\PHPExcel_Worksheet` `null`

## Get worksheet

    getWorksheet() : \PHPExcel_Worksheet

### Returns

`\PHPExcel_Worksheet`

## Resolve a named range to a regular cell range

    resolveRange(string $pNamedRange, \PHPExcel_Worksheet $pSheet) : \PHPExcel_NamedRange

Static

### Parameters

#### $pNamedRange

`string`

Named range

#### $pSheet

`\PHPExcel_Worksheet` `null`

Scope. Use null for global scope

### Returns

`\PHPExcel_NamedRange`

## Set localOnly

    setLocalOnly(bool $value) : \PHPExcel_NamedRange

### Parameters

#### $value

`bool`

### Returns

`\PHPExcel_NamedRange`

## Set name

    setName(string $value) : \PHPExcel_NamedRange

### Parameters

#### $value

`string`

### Returns

`\PHPExcel_NamedRange`

## Set range

    setRange(string $value) : \PHPExcel_NamedRange

### Parameters

#### $value

`string`

### Returns

`\PHPExcel_NamedRange`

## Set scope

    setScope(\PHPExcel_Worksheet $value) : \PHPExcel_NamedRange

### Parameters

#### $value

`\PHPExcel_Worksheet` `null`

### Returns

`\PHPExcel_NamedRange`

## Set worksheet

    setWorksheet(\PHPExcel_Worksheet $value) : \PHPExcel_NamedRange

### Parameters

#### $value

`\PHPExcel_Worksheet`

### Returns

`\PHPExcel_NamedRange`

### Properties

##

    $_localOnly : bool

can only be used on $this->_worksheet)

##

    $_name : string

##

    $_range : string

##

    $_scope : \PHPExcel_Worksheet

##

    $_worksheet : \PHPExcel_Worksheet