[]
Represents the collection of hyperlinks for a worksheet, range, or shape.
Each hyperlink in the collection is represented by an IHyperlink object. Use this interface to add, access, iterate, or delete hyperlinks that are attached to a worksheet, a cell, a range, or a shape.
public interface IHyperlinks : IEnumerable
Public Interface IHyperlinks
Inherits IEnumerable
IHyperlinks hyperlinks = worksheet.Range["A1:B2"].Hyperlinks;
hyperlinks.Add(worksheet.Range["A1"], "https://www.example.com/", null, "Open website", "Example");
IHyperlink hyperlink = hyperlinks[0];
| Name | Description |
|---|---|
| Count | Gets the number of objects in the collection. For an IHyperlinks collection, this value indicates how many IHyperlink objects are contained in the worksheet or range. |
| this[int] | Gets the IHyperlink by index. The index is zero-based. If the index is outside the collection, this property returns null. |
| Name | Description |
|---|---|
| Add(IShape, string, string, string, string) | Adds a hyperlink to the specified shape (IHyperlink object).
Use this method to attach a hyperlink to a shape such as an auto shape, chart,
connector, picture, or group shape. The hyperlink target is defined by
|
| Add(IRange, string, string, string, string) | Adds a hyperlink to the specified range (IHyperlink object). Use this method to attach a hyperlink to the specified anchor range. |
| Delete() | Deletes the hyperlinks in this collection. When this collection belongs to a worksheet, this method deletes all hyperlinks in the worksheet. When it belongs to a range, this method deletes the hyperlinks in that range. |