class NamedRange (View source)

Methods

__construct(string $pName, Worksheet $pWorksheet, string $pRange = 'A1', bool $pLocalOnly = false, null|Worksheet $pScope = null)

Create a new NamedRange.

string
getName()

Get name.

setName(string $value)

Set name.

getWorksheet()

Get worksheet.

setWorksheet(Worksheet $value = null)

Set worksheet.

string
getRange()

Get range.

setRange(string $value)

Set range.

bool
getLocalOnly()

Get localOnly.

setLocalOnly(bool $value)

Set localOnly.

null|Worksheet
getScope()

Get scope.

setScope(Worksheet $value = null)

Set scope.

static NamedRange
resolveRange(string $pNamedRange, Worksheet $pSheet)

Resolve a named range to a regular cell range.

__clone()

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

Details

__construct(string $pName, Worksheet $pWorksheet, string $pRange = 'A1', bool $pLocalOnly = false, null|Worksheet $pScope = null)

Create a new NamedRange.

Parameters

string $pName
Worksheet $pWorksheet
string $pRange
bool $pLocalOnly
null|Worksheet $pScope Scope. Only applies when $pLocalOnly = true. Null for global scope.

Exceptions

Exception

string getName()

Get name.

Return Value

string

NamedRange setName(string $value)

Set name.

Parameters

string $value

Return Value

NamedRange

Worksheet getWorksheet()

Get worksheet.

Return Value

Worksheet

NamedRange setWorksheet(Worksheet $value = null)

Set worksheet.

Parameters

Worksheet $value

Return Value

NamedRange

string getRange()

Get range.

Return Value

string

NamedRange setRange(string $value)

Set range.

Parameters

string $value

Return Value

NamedRange

bool getLocalOnly()

Get localOnly.

Return Value

bool

NamedRange setLocalOnly(bool $value)

Set localOnly.

Parameters

bool $value

Return Value

NamedRange

null|Worksheet getScope()

Get scope.

Return Value

null|Worksheet

NamedRange setScope(Worksheet $value = null)

Set scope.

Parameters

Worksheet $value

Return Value

NamedRange

static NamedRange resolveRange(string $pNamedRange, Worksheet $pSheet)

Resolve a named range to a regular cell range.

Parameters

string $pNamedRange Named range
Worksheet $pSheet Scope. Use null for global scope

Return Value

NamedRange

__clone()

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