ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
NamedFormula.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
PhpOffice\PhpSpreadsheet
;
4
5
use
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
;
6
7
class
NamedFormula
extends
DefinedName
8
{
12
public
function
__construct
(
13
string
$name
,
14
?
Worksheet
$worksheet
= null,
15
?
string
$formula = null,
16
bool
$localOnly
=
false
,
17
?
Worksheet
$scope
= null
18
) {
19
// Validate data
20
if
(!isset($formula)) {
21
throw
new
Exception
(
'You must specify a Formula value for a Named Formula'
);
22
}
23
parent::__construct($name,
$worksheet
, $formula,
$localOnly
,
$scope
);
24
}
25
29
public
function
getFormula
(): string
30
{
31
return
$this->value
;
32
}
33
37
public
function
setFormula
(
string
$formula): self
38
{
39
if
(!empty($formula)) {
40
$this->value = $formula;
41
}
42
43
return
$this;
44
}
45
}
PhpOffice\PhpSpreadsheet\DefinedName
Definition:
DefinedName.php:7
Worksheet
PhpOffice\PhpSpreadsheet\NamedFormula\setFormula
setFormula(string $formula)
Set the formula value.
Definition:
NamedFormula.php:37
PhpOffice\PhpSpreadsheet\DefinedName\$localOnly
$localOnly
Definition:
DefinedName.php:37
PhpOffice\PhpSpreadsheet\DefinedName\$name
$name
Definition:
DefinedName.php:16
PhpOffice\PhpSpreadsheet\NamedFormula\getFormula
getFormula()
Get the formula value.
Definition:
NamedFormula.php:29
PhpOffice\PhpSpreadsheet\DefinedName\$worksheet
$worksheet
Definition:
DefinedName.php:23
PhpOffice\PhpSpreadsheet\NamedFormula
Definition:
NamedFormula.php:7
PhpOffice\PhpSpreadsheet
PhpOffice\PhpSpreadsheet\DefinedName\$value
$value
Definition:
DefinedName.php:30
php
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Definition:
Worksheet.php:28
PhpOffice\PhpSpreadsheet\DefinedName\$scope
$scope
Definition:
DefinedName.php:44
PhpOffice\PhpSpreadsheet\NamedFormula\__construct
__construct(string $name, ?Worksheet $worksheet=null, ?string $formula=null, bool $localOnly=false, ?Worksheet $scope=null)
Create a new Named Formula.
Definition:
NamedFormula.php:12
Exception
libs
composer
vendor
phpoffice
phpspreadsheet
src
PhpSpreadsheet
NamedFormula.php
Generated on Thu Jan 16 2025 19:01:46 for ILIAS by
1.8.13 (using
Doxyfile
)