22 $namedRanges = $workbookData->getElementsByTagNameNS($this->tableNs,
'named-range');
23 foreach ($namedRanges as $definedNameElement) {
24 $definedName = $definedNameElement->getAttributeNS($this->tableNs,
'name');
25 $baseAddress = $definedNameElement->getAttributeNS($this->tableNs,
'base-cell-address');
26 $range = $definedNameElement->getAttributeNS($this->tableNs,
'cell-range-address');
40 $namedExpressions = $workbookData->getElementsByTagNameNS($this->tableNs,
'named-expression');
41 foreach ($namedExpressions as $definedNameElement) {
42 $definedName = $definedNameElement->getAttributeNS($this->tableNs,
'name');
43 $baseAddress = $definedNameElement->getAttributeNS($this->tableNs,
'base-cell-address');
44 $expression = $definedNameElement->getAttributeNS($this->tableNs,
'expression');
47 $expression = substr($expression, strpos($expression,
':=') + 1);
57 private function addDefinedName(
string $baseAddress,
string $definedName,
string $value): void
60 $worksheet = $this->spreadsheet->getSheetByName($sheetReference);
62 if ($worksheet !== null) {
static createInstance(string $name, ?Worksheet $worksheet=null, ?string $value=null, bool $localOnly=false, ?Worksheet $scope=null)
Create a new defined name, either a range or a formula.
static extractSheetTitle($pRange, $returnRange=false)
Extract worksheet title from range.
convertToExcelAddressValue(string $openOfficeAddress)
read(DOMElement $workbookData)
convertToExcelFormulaValue(string $openOfficeFormula)
readDefinedExpressions(DOMElement $workbookData)
Read any Named Formulae that are defined in this spreadsheet.
readDefinedRanges(DOMElement $workbookData)
Read any Named Ranges that are defined in this spreadsheet.
addDefinedName(string $baseAddress, string $definedName, string $value)
Assess scope and store the Defined Name.