diff --git a/Classes/PHPExcel/Cell.php b/Classes/PHPExcel/Cell.php index 7a05ab36..93ebb72a 100644 --- a/Classes/PHPExcel/Cell.php +++ b/Classes/PHPExcel/Cell.php @@ -283,6 +283,10 @@ class PHPExcel_Cell $result = PHPExcel_Calculation::getInstance()->calculateCellValue($this,$resetLog); // echo $this->getCoordinate().' calculation result is '.$result.'
'; } 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().'
'; + return $this->_calculatedValue; // Fallback for calculations referencing external files. + } // echo 'Calculation Exception: '.$ex->getMessage().'
'; $result = '#N/A'; throw(new Exception($this->getParent()->getTitle().'!'.$this->getCoordinate().' -> '.$ex->getMessage()));