ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 3.133.111.158 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/Calculation/LookupRef/ |
Upload File : |
<?php namespace PhpOffice\PhpSpreadsheet\Calculation\LookupRef; use PhpOffice\PhpSpreadsheet\Cell\AddressHelper; use PhpOffice\PhpSpreadsheet\Cell\Cell; use PhpOffice\PhpSpreadsheet\DefinedName; use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; class Helpers { public const CELLADDRESS_USE_A1 = true; public const CELLADDRESS_USE_R1C1 = false; private static function convertR1C1(string &$cellAddress1, ?string &$cellAddress2, bool $a1): string { if ($a1 === self::CELLADDRESS_USE_R1C1) { $cellAddress1 = AddressHelper::convertToA1($cellAddress1); if ($cellAddress2) { $cellAddress2 = AddressHelper::convertToA1($cellAddress2); } } return $cellAddress1 . ($cellAddress2 ? ":$cellAddress2" : ''); } private static function adjustSheetTitle(string &$sheetTitle, ?string $value): void { if ($sheetTitle) { $sheetTitle .= '!'; if (stripos($value ?? '', $sheetTitle) === 0) { $sheetTitle = ''; } } } public static function extractCellAddresses(string $cellAddress, bool $a1, Worksheet $sheet, string $sheetName = ''): array { $cellAddress1 = $cellAddress; $cellAddress2 = null; $namedRange = DefinedName::resolveName($cellAddress1, $sheet, $sheetName); if ($namedRange !== null) { $workSheet = $namedRange->getWorkSheet(); $sheetTitle = ($workSheet === null) ? '' : $workSheet->getTitle(); $value = preg_replace('/^=/', '', $namedRange->getValue()); self::adjustSheetTitle($sheetTitle, $value); $cellAddress1 = $sheetTitle . $value; $cellAddress = $cellAddress1; $a1 = self::CELLADDRESS_USE_A1; } if (strpos($cellAddress, ':') !== false) { [$cellAddress1, $cellAddress2] = explode(':', $cellAddress); } $cellAddress = self::convertR1C1($cellAddress1, $cellAddress2, $a1); return [$cellAddress1, $cellAddress2, $cellAddress]; } public static function extractWorksheet(string $cellAddress, Cell $pCell): array { $sheetName = ''; if (strpos($cellAddress, '!') !== false) { [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true); $sheetName = trim($sheetName, "'"); } $pSheet = ($sheetName !== '') ? $pCell->getWorksheet()->getParent()->getSheetByName($sheetName) : $pCell->getWorksheet(); return [$cellAddress, $pSheet, $sheetName]; } }