Better exception message for new Excel functions
Closes https://github.com/PHPOffice/PHPExcel/issues/1136
This commit is contained in:
parent
13472e8247
commit
0d1ff5b95f
|
@ -3764,6 +3764,11 @@ class Calculation
|
||||||
} elseif (preg_match('/^' . self::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $token, $matches)) {
|
} elseif (preg_match('/^' . self::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $token, $matches)) {
|
||||||
$namedRange = $matches[6];
|
$namedRange = $matches[6];
|
||||||
$this->debugLog->writeDebugLog('Evaluating Named Range ', $namedRange);
|
$this->debugLog->writeDebugLog('Evaluating Named Range ', $namedRange);
|
||||||
|
|
||||||
|
if (substr($namedRange, 0, 6) === '_xlfn.') {
|
||||||
|
return $this->raiseFormulaError("undefined named range / function '$token'");
|
||||||
|
}
|
||||||
|
|
||||||
$cellValue = $this->extractNamedRange($namedRange, ((null !== $pCell) ? $pCellWorksheet : null), false);
|
$cellValue = $this->extractNamedRange($namedRange, ((null !== $pCell) ? $pCellWorksheet : null), false);
|
||||||
$pCell->attach($pCellParent);
|
$pCell->attach($pCellParent);
|
||||||
$this->debugLog->writeDebugLog('Evaluation Result for named range ', $namedRange, ' is ', $this->showTypeDetails($cellValue));
|
$this->debugLog->writeDebugLog('Evaluation Result for named range ', $namedRange, ' is ', $this->showTypeDetails($cellValue));
|
||||||
|
|
Loading…
Reference in New Issue