def write_url(*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 < 3

    # Add start row and col to arg list
    write_url_range(args[0], args[1], *args)
  end
def write_url(*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 < 3

    # Add start row and col to arg list
    write_url_range(args[0], args[1], *args)
  end
:call-seq:
   write_url(row, col   , url[, label, , format]) -> int
   write_url(A1_notation, url[, label, , format]) -> int

 Write a hyperlink. This is comprised of two elements: the visible _label_ and
 the invisible link. The visible _label_ is the same as the link unless an
 alternative string is specified.

 The parameters _label_ and _format_ are optional.

 The _url_ can be to a http, ftp, mail, internal sheet, or external
 directory url.

 Returns  0 : normal termination
         -1 : insufficient number of arguments
         -2 : row or column out of range
         -3 : long string truncated to 255 chars

 Write a hyperlink to a URL in the cell specified by row and column. The
 hyperlink is comprised of two elements: the visible _label_ and the
 invisible link. The visible _label_ is the same as the link unless an
 alternative label is specified. The parameters _label_ and the _format_
 are optional.

 The _label_ is written using the write() method. Therefore it is possible
 to write strings, numbers or formulas as labels.

 There are four web style URI's supported: http://, https://, ftp:// and
 mailto::

     worksheet.write_url(0, 0,  'ftp://www.ruby.org/'                  )
     worksheet.write_url(1, 0,  'http://www.ruby.com/', 'Ruby home'    )
     worksheet.write_url('A3',  'http://www.ruby.com/', format        )
     worksheet.write_url('A4',  'http://www.ruby.com/', 'Perl', format)
     worksheet.write_url('A5',  'mailto:bar@foo.com'            )

 There are two local URIs supported: internal: and external:. These are used
 for hyperlinks to internal worksheet references or external workbook and
 worksheet references:

     worksheet.write_url('A6',  'internal:Sheet2!A1'                   )
     worksheet.write_url('A7',  'internal:Sheet2!A1',   format         )
     worksheet.write_url('A8',  'internal:Sheet2!A1:B2'                )
     worksheet.write_url('A9',  q{internal:'Sales Data'!A1}            )
     worksheet.write_url('A10', 'external:c:\temp\foo.xls'             )
     worksheet.write_url('A11', 'external:c:\temp\foo.xls#Sheet2!A1'   )
     worksheet.write_url('A12', 'external:..\..\..\foo.xls'            )
     worksheet.write_url('A13', 'external:..\..\..\foo.xls#Sheet2!A1'  )
     worksheet.write_url('A13', 'external:\\\\NETWORK\share\foo.xls'   )

 All of the these URI types are recognised by the write() method, see above.

 Worksheet references are typically of the form Sheet1!A1. You can also refer
 to a worksheet range using the standard Excel notation: Sheet1!A1:B2.

 In external links the workbook and worksheet name must be separated by the
 # character: external:Workbook.xls#Sheet1!A1'.

 You can also link to a named range in the target worksheet. For example say
 you have a named range called my_name in the workbook c:\temp\foo.xls you
 could link to it as follows:

     worksheet.write_url('A14', 'external:c:\temp\foo.xls#my_name')

 Note, you cannot currently create named ranges with WriteExcel.

 Links to network files are also supported. MS/Novell Network files normally
 begin with two back slashes as follows \\NETWORK\etc. In order to generate
 this in a single or double quoted string you will have to escape the
 backslashes, '\\\\NETWORK\etc'.

 If you are using double quote strings then you should be careful to escape
 anything that looks like a metacharacter. Why can't I use "C:\temp\foo" in
 DOS paths?.

 Finally, you can avoid most of these quoting problems by using forward
 slashes. These are translated internally to backslashes:

     worksheet.write_url('A14', "external:c:/temp/foo.xls"             )
     worksheet.write_url('A15', 'external://NETWORK/share/foo.xls'     )

 See also, the note about "Cell notation".