mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-26 07:16:03 +03:00
Bugfix: Work item 16956 - External links in Excel2010 files cause Fatal error
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@83262 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
parent
f2076cde3f
commit
6e7b84ef97
@ -283,6 +283,10 @@ class PHPExcel_Cell
|
||||
$result = PHPExcel_Calculation::getInstance()->calculateCellValue($this,$resetLog);
|
||||
// echo $this->getCoordinate().' calculation result is '.$result.'<br />';
|
||||
} catch ( Exception $ex ) {
|
||||
if (($ex->getMessage() === 'Unable to access External Workbook') && (!is_null($this->_calculatedValue))) {
|
||||
// echo 'Returning fallback value of '.$this->_calculatedValue.' for cell '.$this->getCoordinate().'<br />';
|
||||
return $this->_calculatedValue; // Fallback for calculations referencing external files.
|
||||
}
|
||||
// echo 'Calculation Exception: '.$ex->getMessage().'<br />';
|
||||
$result = '#N/A';
|
||||
throw(new Exception($this->getParent()->getTitle().'!'.$this->getCoordinate().' -> '.$ex->getMessage()));
|
||||
|
Loading…
Reference in New Issue
Block a user