private function _updateCellRange($pCellRange = 'A1:A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) {
		if (strpos($pCellRange,':') !== false || strpos($pCellRange, ',') !== false) {
			// Update range
			$range = PHPExcel_Cell::splitRange($pCellRange);
			$ic = count($range);
			for ($i = 0; $i < $ic; ++$i) {
				$jc = count($range[$i]);
				for ($j = 0; $j < $jc; ++$j) {
					if (ctype_alpha($range[$i][$j])) {
						$r = PHPExcel_Cell::coordinateFromString($this->_updateSingleCellReference($range[$i][$j].'1', $pBefore, $pNumCols, $pNumRows));
						$range[$i][$j] = $r[0];
					} elseif(ctype_digit($range[$i][$j])) {
						$r = PHPExcel_Cell::coordinateFromString($this->_updateSingleCellReference('A'.$range[$i][$j], $pBefore, $pNumCols, $pNumRows));
						$range[$i][$j] = $r[1];
					} else {
						$range[$i][$j] = $this->_updateSingleCellReference($range[$i][$j], $pBefore, $pNumCols, $pNumRows);
					}
				}
			}

			// Recreate range string
			return PHPExcel_Cell::buildRange($range);
		} else {
			throw new PHPExcel_Exception("Only cell ranges may be passed to this method.");
		}
	}
private function _updateCellRange($pCellRange = 'A1:A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) {
		if (strpos($pCellRange,':') !== false || strpos($pCellRange, ',') !== false) {
			// Update range
			$range = PHPExcel_Cell::splitRange($pCellRange);
			$ic = count($range);
			for ($i = 0; $i < $ic; ++$i) {
				$jc = count($range[$i]);
				for ($j = 0; $j < $jc; ++$j) {
					if (ctype_alpha($range[$i][$j])) {
						$r = PHPExcel_Cell::coordinateFromString($this->_updateSingleCellReference($range[$i][$j].'1', $pBefore, $pNumCols, $pNumRows));
						$range[$i][$j] = $r[0];
					} elseif(ctype_digit($range[$i][$j])) {
						$r = PHPExcel_Cell::coordinateFromString($this->_updateSingleCellReference('A'.$range[$i][$j], $pBefore, $pNumCols, $pNumRows));
						$range[$i][$j] = $r[1];
					} else {
						$range[$i][$j] = $this->_updateSingleCellReference($range[$i][$j], $pBefore, $pNumCols, $pNumRows);
					}
				}
			}

			// Recreate range string
			return PHPExcel_Cell::buildRange($range);
		} else {
			throw new PHPExcel_Exception("Only cell ranges may be passed to this method.");
		}
	}
private function _updateCellRange ( $ pCellRange = 'A1:A1' , $ pBefore = 'A1' , $ pNumCols = 0 , $ pNumRows = 0 ) { if ( strpos ( $ pCellRange , ':' ) !== false || strpos ( $ pCellRange , ',' ) !== false ) { // Update range $ range = PHPExcel_Cell :: splitRange ( $ pCellRange ) ; $ ic = count ( $ range ) ; for ( $ i = 0 ; $ i < $ ic ; ++ $ i ) { $ jc = count ( $ range [ $ i ] ) ; for ( $ j = 0 ; $ j < $ jc ; ++ $ j ) { if ( ctype_alpha ( $ range [ $ i ] [ $ j ] ) ) { $ r = PHPExcel_Cell :: coordinateFromString ( $ this -> _updateSingleCellReference ( $ range [ $ i ] [ $ j ] . '1' , $ pBefore , $ pNumCols , $ pNumRows ) ) ; $ range [ $ i ] [ $ j ] = $ r [ 0 ] ; } elseif ( ctype_digit ( $ range [ $ i ] [ $ j ] ) ) { $ r = PHPExcel_Cell :: coordinateFromString ( $ this -> _updateSingleCellReference ( 'A' . $ range [ $ i ] [ $ j ] , $ pBefore , $ pNumCols , $ pNumRows ) ) ; $ range [ $ i ] [ $ j ] = $ r [ 1 ] ; } else { $ range [ $ i ] [ $ j ] = $ this -> _updateSingleCellReference ( $ range [ $ i ] [ $ j ] , $ pBefore , $ pNumCols , $ pNumRows ) ; } } } // Recreate range string return PHPExcel_Cell :: buildRange ( $ range ) ; } else { throw new PHPExcel_Exception ( "Only cell ranges may be passed to this method." ) ; } }
Update cell range

@param	string	$pCellRange			Cell range	(e.g. 'B2:D4', 'B:C' or '2:3')
@param	int		$pBefore			Insert before this one
@param	int		$pNumCols			Number of columns to increment
@param	int		$pNumRows			Number of rows to increment
@return	string	Updated cell range
@throws	PHPExcel_Exception
Update cell range