Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php
public function writeUrlRange($row1, $col1, $row2, $col2, $url)
    {
        // Check for internal/external sheet links or default to web link
        if (preg_match('[^internal:]', $url)) {
            return $this->writeUrlInternal($row1, $col1, $row2, $col2, $url);
        }
        if (preg_match('[^external:]', $url)) {
            return $this->writeUrlExternal($row1, $col1, $row2, $col2, $url);
        }

        return $this->writeUrlWeb($row1, $col1, $row2, $col2, $url);
    }
public function writeUrlRange($row1, $col1, $row2, $col2, $url)
    {
        // Check for internal/external sheet links or default to web link
        if (preg_match('[^internal:]', $url)) {
            return $this->writeUrlInternal($row1, $col1, $row2, $col2, $url);
        }
        if (preg_match('[^external:]', $url)) {
            return $this->writeUrlExternal($row1, $col1, $row2, $col2, $url);
        }

        return $this->writeUrlWeb($row1, $col1, $row2, $col2, $url);
    }
This is the more general form of writeUrl(). It allows a hyperlink to be
written to a range of cells. This function also decides the type of hyperlink
to be written. These are either, Web (http, ftp, mailto), Internal
(Sheet1!A1) or external ('c:\temp\foo.xls#Sheet1!A1').

@see writeUrl()

@param int $row1 Start row
@param int $col1 Start column
@param int $row2 End row
@param int $col2 End column
@param string $url URL string

@return int