Export (0) Print
Expand All
Expand Minimize

WorksheetBase.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.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

public Hyperlinks Hyperlinks { get; }

Property Value

Type: Microsoft.Office.Interop.Excel.Hyperlinks
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.

This example is for a document-level customization.

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

Show:
© 2014 Microsoft