HyperlinkCollection.Add

Add(int, int, int, int, string)

Adds a hyperlink to a specified cell or a range of cells.

public int Add(int firstRow, int firstColumn, int totalRows, int totalColumns, string address)
ParameterTypeDescription
firstRowInt32First row of the hyperlink range.
firstColumnInt32First column of the hyperlink range.
totalRowsInt32Number of rows in this hyperlink range.
totalColumnsInt32Number of columns of this hyperlink range.
addressStringAddress of the hyperlink.

Return Value

Hyperlink object index.

Examples

[C#]
//Instantiating a Workbook object
Workbook excel = new Workbook();
Worksheet worksheet = excel.Worksheets[0];
worksheet.Hyperlinks.Add("A4", 1, 1, "http://www.aspose.com");
worksheet.Hyperlinks.Add("A5", 1, 1, "c:\\book1.xls");

[Visual Basic]

'Instantiating a Workbook object
Dim excel As Workbook = New Workbook()
Dim worksheet as Worksheet = excel.Worksheets(0)
worksheet.Hyperlinks.Add("A4", 1, 1, "http://www.aspose.com")
worksheet.Hyperlinks.Add("A5", 1, 1, "c:\\book1.xls")

See Also


Add(string, int, int, string)

Adds a hyperlink to a specified cell or a range of cells.

public int Add(string cellName, int totalRows, int totalColumns, string address)
ParameterTypeDescription
cellNameStringCell name.
totalRowsInt32Number of rows in this hyperlink range.
totalColumnsInt32Number of columns of this hyperlink range.
addressStringAddress of the hyperlink.

Return Value

Hyperlink object index.

See Also


Add(string, string, string, string, string)

Adds a hyperlink to a specified cell or a range of cells.

public int Add(string startCellName, string endCellName, string address, string textToDisplay, 
    string screenTip)
ParameterTypeDescription
startCellNameStringThe top-left cell of the range.
endCellNameStringThe bottom-right cell of the range.
addressStringAddress of the hyperlink.
textToDisplayStringThe text to be displayed for the specified hyperlink.
screenTipStringThe screenTip text for the specified hyperlink.

Return Value

Hyperlink object index.

See Also