diff --git a/Classes/PHPExcel/Cell.php b/Classes/PHPExcel/Cell.php index 796217be..94fff477 100644 --- a/Classes/PHPExcel/Cell.php +++ b/Classes/PHPExcel/Cell.php @@ -701,7 +701,7 @@ class PHPExcel_Cell $ranges = PHPExcel_Cell::splitRange($cellBlock); foreach($ranges as $range) { // Single cell? - if (count($range) == 1) { + if (!isset($range[1])) { $returnValue[] = $range[0]; continue; } diff --git a/Classes/PHPExcel/ReferenceHelper.php b/Classes/PHPExcel/ReferenceHelper.php index e52c7431..c72cf06b 100644 --- a/Classes/PHPExcel/ReferenceHelper.php +++ b/Classes/PHPExcel/ReferenceHelper.php @@ -536,8 +536,10 @@ class PHPExcel_ReferenceHelper if (strpos($pCellRange,':') !== false || strpos($pCellRange, ',') !== false) { // Update range $range = PHPExcel_Cell::splitRange($pCellRange); - for ($i = 0; $i < count($range); ++$i) { - for ($j = 0; $j < count($range[$i]); ++$j) { + $ic = count($range); + for ($i = 0; $i < $ic; ++$i) { + $jc = count($range[$i]); + for ($j = 0; $j < $jc; ++$j) { $range[$i][$j] = $this->_updateSingleCellReference($range[$i][$j], $pBefore, $pNumCols, $pNumRows); } }