PATH:
home
/
lab2454c
/
aficb.com
/
vendor
/
phpoffice
/
phpspreadsheet
/
src
/
PhpSpreadsheet
/
Calculation
/
LookupRef
<?php namespace PhpOffice\PhpSpreadsheet\Calculation\LookupRef; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Calculation\Functions; use PhpOffice\PhpSpreadsheet\Cell\Cell; class Formula { /** * FORMULATEXT. * * @param mixed $cellReference The cell to check * @param Cell $cell The current cell (containing this formula) * * @return string */ public static function text($cellReference = '', ?Cell $cell = null) { if ($cell === null) { return Functions::REF(); } preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellReference, $matches); $cellReference = $matches[6] . $matches[7]; $worksheetName = trim($matches[3], "'"); $worksheet = (!empty($worksheetName)) ? $cell->getWorksheet()->getParent()->getSheetByName($worksheetName) : $cell->getWorksheet(); if ( $worksheet === null || !$worksheet->cellExists($cellReference) || !$worksheet->getCell($cellReference)->isFormula() ) { return Functions::NA(); } return $worksheet->getCell($cellReference)->getValue(); } }
[-] Hyperlink.php
[edit]
[+]
..
[-] Address.php
[edit]
[-] Indirect.php
[edit]
[-] Selection.php
[edit]
[-] Formula.php
[edit]
[-] HLookup.php
[edit]
[-] Offset.php
[edit]
[-] LookupRefValidations.php
[edit]
[-] Helpers.php
[edit]
[-] LookupBase.php
[edit]
[-] RowColumnInformation.php
[edit]
[-] Lookup.php
[edit]
[-] VLookup.php
[edit]
[-] Matrix.php
[edit]
[-] ExcelMatch.php
[edit]