diff --git a/PHPExcel/Calculation.php b/PHPExcel/Calculation.php index 072f69e..fe62d14 100644 --- a/PHPExcel/Calculation.php +++ b/PHPExcel/Calculation.php @@ -2955,7 +2955,7 @@ class PHPExcel_Calculation { // echo 'Element is a Variable, Constant, String, Number or Boolean
'; // If the last entry on the stack was a : operator, then we may have a row or column range reference $testPrevOp = $stack->last(1); - if ($testPrevOp['value'] == ':') { + if (isset($testPrevOp['value']) && $testPrevOp['value'] == ':') { $startRowColRef = $output[count($output)-1]['value']; $rangeWS1 = ''; if (strpos('!',$startRowColRef) !== FALSE) { diff --git a/PHPExcel/ReferenceHelper.php b/PHPExcel/ReferenceHelper.php index 402f2b4..f9fe4dc 100644 --- a/PHPExcel/ReferenceHelper.php +++ b/PHPExcel/ReferenceHelper.php @@ -889,9 +889,9 @@ class PHPExcel_ReferenceHelper list($newColumn, $newRow) = PHPExcel_Cell::coordinateFromString( $pCellReference ); // Verify which parts should be updated - $updateColumn = (($newColumn{0} != '$') && ($beforeColumn{0} != '$') && + $updateColumn = (($newColumn[0] != '$') && ($beforeColumn[0] != '$') && PHPExcel_Cell::columnIndexFromString($newColumn) >= PHPExcel_Cell::columnIndexFromString($beforeColumn)); - $updateRow = (($newRow{0} != '$') && ($beforeRow{0} != '$') && + $updateRow = (($newRow[0] != '$') && ($beforeRow[0] != '$') && $newRow >= $beforeRow); // Create new column reference