Documentation

DefinedName

Table of Contents

REGEXP_IDENTIFY_FORMULA  = '[^_\p{N}\p{L}:, \$'!]'
$isFormula  : bool
Whether this is a named range or a named formula.
$localOnly  : bool
Is the defined named local? (i.e. can only be used on $this->worksheet).
$name  : string
Name.
$scope  : Worksheet
Scope.
$value  : string
Value of the named object.
$worksheet  : Worksheet
Worksheet on which the defined name can be resolved.
__clone()  : mixed
Implement PHP __clone to create a deep clone, not just a shallow copy.
__construct()  : mixed
Create a new Defined Name.
createInstance()  : self
Create a new defined name, either a range or a formula.
getLocalOnly()  : bool
Get localOnly.
getName()  : string
Get name.
getScope()  : Worksheet|null
Get scope.
getValue()  : string
Get range or formula value.
getWorksheet()  : Worksheet|null
Get worksheet.
isFormula()  : bool
Identify whether this is a named range or a named formula.
resolveName()  : self|null
Resolve a named range to a regular cell range or formula.
setLocalOnly()  : self
Set localOnly.
setName()  : self
Set name.
setScope()  : self
Set scope.
setValue()  : self
Set range or formula value.
setWorksheet()  : self
Set worksheet.
testIfFormula()  : bool

Constants

REGEXP_IDENTIFY_FORMULA

protected mixed REGEXP_IDENTIFY_FORMULA = '[^_\p{N}\p{L}:, \$'!]'

Properties

$isFormula

Whether this is a named range or a named formula.

protected bool $isFormula

$localOnly

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

protected bool $localOnly

$value

Value of the named object.

protected string $value

Methods

__clone()

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

public __clone() : mixed
Return values
mixed

__construct()

Create a new Defined Name.

public __construct(string $name[, Worksheet|null $worksheet = null ][, string|null $value = null ][, bool $localOnly = false ][, Worksheet|null $scope = null ]) : mixed
Parameters
$name : string
$worksheet : Worksheet|null = null
$value : string|null = null
$localOnly : bool = false
$scope : Worksheet|null = null
Return values
mixed

createInstance()

Create a new defined name, either a range or a formula.

public static createInstance(string $name[, Worksheet|null $worksheet = null ][, string|null $value = null ][, bool $localOnly = false ][, Worksheet|null $scope = null ]) : self
Parameters
$name : string
$worksheet : Worksheet|null = null
$value : string|null = null
$localOnly : bool = false
$scope : Worksheet|null = null
Return values
self

getLocalOnly()

Get localOnly.

public getLocalOnly() : bool
Return values
bool

getName()

Get name.

public getName() : string
Return values
string

getValue()

Get range or formula value.

public getValue() : string
Return values
string

isFormula()

Identify whether this is a named range or a named formula.

public isFormula() : bool
Return values
bool

resolveName()

Resolve a named range to a regular cell range or formula.

public static resolveName(string $definedName, Worksheet $worksheet[, string $sheetName = '' ]) : self|null
Parameters
$definedName : string
$worksheet : Worksheet
$sheetName : string = ''
Return values
self|null

setLocalOnly()

Set localOnly.

public setLocalOnly(bool $localScope) : self
Parameters
$localScope : bool
Return values
self

setName()

Set name.

public setName(string $name) : self
Parameters
$name : string
Return values
self

setValue()

Set range or formula value.

public setValue(string $value) : self
Parameters
$value : string
Return values
self

setWorksheet()

Set worksheet.

public setWorksheet(Worksheet|null $worksheet) : self
Parameters
$worksheet : Worksheet|null
Return values
self

testIfFormula()

public static testIfFormula(string $value) : bool
Parameters
$value : string
Return values
bool

Search results