Documentation

NamedFormula extends DefinedName
in package

Table of Contents

Constants

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

Properties

$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|null
Scope.
$value  : string
Value of the named object.
$worksheet  : Worksheet|null
Worksheet on which the defined name can be resolved.

Methods

__clone()  : mixed
Implement PHP __clone to create a deep clone, not just a shallow copy.
__construct()  : mixed
Create a new Named Formula.
__destruct()  : mixed
createInstance()  : self
Create a new defined name, either a range or a formula.
getFormula()  : string
Get the formula value.
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.
setFormula()  : self
Set the formula value.
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

$worksheet

Worksheet on which the defined name can be resolved.

protected Worksheet|null $worksheet

Methods

__clone()

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

public __clone() : mixed

__construct()

Create a new Named Formula.

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

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

getFormula()

Get the formula value.

public getFormula() : string
Return values
string

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

setFormula()

Set the formula value.

public setFormula(string $formula) : self
Parameters
$formula : string
Return values
self

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

        
On this page

Search results