This documentation is archived and is not being maintained.

Worksheet.Hyperlinks Property

Gets a Microsoft.Office.Interop.Excel.Hyperlinks collection that represents the hyperlinks for the range or worksheet.

Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in microsoft.office.tools.excel.dll)

public virtual Hyperlinks Hyperlinks { get; }

Property Value

A Microsoft.Office.Interop.Excel.Hyperlinks collection that represents the hyperlinks for the range or worksheet.

The following code example uses the Hyperlinks property to add a hyperlink to the Microsoft.Office.Interop.Excel.Hyperlinks collection of the worksheet.

private void AddHyperLink()
{
    Excel.Hyperlink link = (Excel.Hyperlink)this.Hyperlinks.Add(
        this.Range["A1", missing], "http://www.microsoft.com",
        missing, "Microsoft", "Microsoft's Website.");
}

Show: