\PhpOffice\PhpSpreadsheetNamedRange

Summary

Methods
Properties
Constants
__construct()
getName()
setName()
getWorksheet()
setWorksheet()
getRange()
setRange()
getLocalOnly()
setLocalOnly()
getScope()
setScope()
resolveRange()
__clone()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$name
$worksheet
$range
$localOnly
$scope
N/A

Properties

$name

$name : string

Range name.

Type

string

$worksheet

$worksheet : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

Worksheet on which the named range can be resolved.

Type

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

$range

$range : string

Range of the referenced cells.

Type

string

$localOnly

$localOnly : boolean

Is the named range local? (i.e. can only be used on $this->worksheet).

Type

boolean

$scope

$scope : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

Scope.

Type

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

Methods

__construct()

__construct(string  $pName, \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $pWorksheet, string  $pRange = 'A1', boolean  $pLocalOnly = false, null|\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $pScope = null) 

Create a new NamedRange.

Parameters

string $pName
\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet
string $pRange
boolean $pLocalOnly
null|\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pScope

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

Throws

\PhpOffice\PhpSpreadsheet\Exception

getName()

getName() : string

Get name.

Returns

string

setName()

setName(string  $value) : $this

Set name.

Parameters

string $value

Returns

$this

getWorksheet()

getWorksheet() : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

Get worksheet.

Returns

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

setWorksheet()

setWorksheet(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $value = null) : $this

Set worksheet.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $value

Returns

$this

getRange()

getRange() : string

Get range.

Returns

string

setRange()

setRange(string  $value) : $this

Set range.

Parameters

string $value

Returns

$this

getLocalOnly()

getLocalOnly() : boolean

Get localOnly.

Returns

boolean

setLocalOnly()

setLocalOnly(boolean  $value) : $this

Set localOnly.

Parameters

boolean $value

Returns

$this

getScope()

getScope() : null|\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

Get scope.

Returns

null|\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

setScope()

setScope(null|\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $value = null) : $this

Set scope.

Parameters

null|\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $value

Returns

$this

resolveRange()

resolveRange(string  $pNamedRange, null|\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $pSheet) : \PhpOffice\PhpSpreadsheet\NamedRange

Resolve a named range to a regular cell range.

Parameters

string $pNamedRange

Named range

null|\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pSheet

Scope. Use null for global scope

Returns

\PhpOffice\PhpSpreadsheet\NamedRange

__clone()

__clone() 

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