Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/ReferenceHelper.php
public function updateCellReference($pCellRange = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0)
    {
        // Is it in another worksheet? Will not have to update anything.
        if (strpos($pCellRange, '!') !== false) {
            return $pCellRange;
        // Is it a range or a single cell?
        } elseif (!Coordinate::coordinateIsRange($pCellRange)) {
            // Single cell
            return $this->updateSingleCellReference($pCellRange, $pBefore, $pNumCols, $pNumRows);
        } elseif (Coordinate::coordinateIsRange($pCellRange)) {
            // Range
            return $this->updateCellRange($pCellRange, $pBefore, $pNumCols, $pNumRows);
        }

        // Return original
        return $pCellRange;
    }
public function updateCellReference($pCellRange = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0)
    {
        // Is it in another worksheet? Will not have to update anything.
        if (strpos($pCellRange, '!') !== false) {
            return $pCellRange;
        // Is it a range or a single cell?
        } elseif (!Coordinate::coordinateIsRange($pCellRange)) {
            // Single cell
            return $this->updateSingleCellReference($pCellRange, $pBefore, $pNumCols, $pNumRows);
        } elseif (Coordinate::coordinateIsRange($pCellRange)) {
            // Range
            return $this->updateCellRange($pCellRange, $pBefore, $pNumCols, $pNumRows);
        }

        // Return original
        return $pCellRange;
    }
Update cell reference.

@param string $pCellRange Cell range
@param string $pBefore Insert before this one
@param int $pNumCols Number of columns to increment
@param int $pNumRows Number of rows to increment

@throws Exception

@return string Updated cell range