def write_url_range(*args)
    # Check for a cell reference in A1 notation and substitute row and column
    args = row_col_notation(args)

    # Check the number of args
    return -1 if args.size < 5

    # Reverse the order of _string_ and _format_ if necessary. We work on a copy
    # in order to protect the callers args.
    #
    args[5], args[6] = [ args[6], args[5] ] if args[5].respond_to?(:xf_index)

    url = args[4]

    # Check for internal/external sheet links or default to web link
    return write_url_internal(*args) if url =~ /^internal:/
    return write_url_external(*args) if url =~ /^external:/
    write_url_web(*args)
  end
def write_url_range(*args)
    # Check for a cell reference in A1 notation and substitute row and column
    args = row_col_notation(args)

    # Check the number of args
    return -1 if args.size < 5

    # Reverse the order of _string_ and _format_ if necessary. We work on a copy
    # in order to protect the callers args.
    #
    args[5], args[6] = [ args[6], args[5] ] if args[5].respond_to?(:xf_index)

    url = args[4]

    # Check for internal/external sheet links or default to web link
    return write_url_internal(*args) if url =~ /^internal:/
    return write_url_external(*args) if url =~ /^external:/
    write_url_web(*args)
  end
:call-seq:
   write_url_range(row1, col1, row2, col2, url[, string, , format])  -> Fixnum
   write_url_range('A1:D2',                url[, string, , format])  -> Fixnum

 This is the more general form of write_url(). 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 also write_url() above for a general description and return values.

 This method is essentially the same as the write_url() method described
 above. The main difference is that you can specify a link for a range of
 cells:

     worksheet.write_url(0, 0, 0, 3, 'ftp://www.ruby.org/'              )
     worksheet.write_url(1, 0, 0, 3, 'http://www.ruby.com/', 'Ruby home')
     worksheet.write_url('A3:D3',    'internal:Sheet2!A1'               )
     worksheet.write_url('A4:D4',    'external:c:\temp\foo.xls'         )

 This method is generally only required when used in conjunction with merged
 cells. See the merge_range() method and the merge property of a Format
 object, "CELL FORMATTING".

 There is no way to force this behaviour through the write() method.

 The parameters _string_ and the $format are optional and their position is
 interchangeable. However, they are applied only to the first cell in the
 range.

 See also, the note about "Cell notation".