The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
Row

HyperlinkCollection Interface

A collection of hyperlinks contained in worksheet cells.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v19.1.Core.dll

Declaration

public interface HyperlinkCollection :
    ISimpleCollection<Hyperlink>,
    IEnumerable<Hyperlink>,
    IEnumerable,
    ICollection
Public Interface HyperlinkCollection
    Inherits ISimpleCollection(Of Hyperlink),
             IEnumerable(Of Hyperlink),
             IEnumerable,
             ICollection
public interface HyperlinkCollection :
    ISimpleCollection<Hyperlink>,
    IEnumerable<Hyperlink>,
    IEnumerable,
    ICollection
Public Interface HyperlinkCollection
    Inherits ISimpleCollection(Of Hyperlink),
             IEnumerable(Of Hyperlink),
             IEnumerable,
             ICollection

Remarks

The HyperlinkCollection object is a collection of Hyperlink objects. It is accessible via the Worksheet.Hyperlinks property.

Examples

This example demonstrates how to create a hyperlink to a web page or cell range in a workbook. To do this, use the HyperlinkCollection.Add method with the cell or cell range into which a hyperlink should be inserted, the target web page, or the workbook location passed along with other parameters.

Important

The maximum number of hyperlinks in a worksheet is 65,530.

All hyperlinks created in a worksheet are contained in the HyperlinkCollection collection returned by the Worksheet.Hyperlinks property. To adjust an existing hyperlink, use properties of the Hyperlink object, which can be accessed by the hyperlink index from the HyperlinkCollection collection. To get all hyperlinks contained in the specified cell range, use the HyperlinkCollection.GetHyperlinks method.

To remove hyperlinks, use the HyperlinkCollection.Remove, HyperlinkCollection.RemoveAt or HyperlinkCollection.Clear method. The Worksheet.ClearHyperlinks method deletes all hyperlinks from the specified range of cells.

// Create a hyperlink to a web page.
Cell cell = worksheet.Cells["A1"];
worksheet.Hyperlinks.Add(cell, "http://www.devexpress.com/", true, "DevExpress");

// Create a hyperlink to a cell range in a workbook.
Range range = worksheet.Range["C3:D4"];
Hyperlink cellHyperlink = worksheet.Hyperlinks.Add(range, "Sheet2!B2:E7", false, "Select Range");
cellHyperlink.TooltipText = "Click Me";
See Also