[]
Represents a hyperlink.
An IHyperlink stores the link target and related display information for
a hyperlink attached to a worksheet range or a shape. Use this interface to inspect
or modify the hyperlink address, subaddress, screen tip, email subject, and display text.
public interface IHyperlink
Public Interface IHyperlink
IHyperlink hyperlink = worksheet.Hyperlinks.Add(
worksheet.Range["A1"],
"https://www.example.com",
null,
"Open the example website",
"Example");
hyperlink.TextToDisplay = "Visit example";
| Name | Description |
|---|---|
| Address | Gets or sets the address of the target document. For a hyperlink to a location in the current document, set SubAddress and set this value to null. |
| EmailSubject | Gets or sets the subject of the specified e-mail hyperlink.
Use this property to store and retrieve the subject associated with a If the subject contains spaces or reserved URI characters, encode it as a URI component before assigning it to this property. |
| Name | Gets the name of the hyperlink. |
| Range | Gets the IRange object that represents the range the specified hyperlink is attached to, or null if the hyperlink is attached to a shape. |
| ScreenTip | Gets or sets the ScreenTip text for the specified hyperlink. The ScreenTip is the text displayed when the pointer rests on the hyperlink. |
| Shape | Gets the Use this property to access the shape anchor when the hyperlink is attached to a drawing object instead of a cell range. |
| SubAddress | Gets or sets the location within the document associated with the hyperlink. This value identifies the document-internal target of the hyperlink, such as a worksheet range reference. |
| TextToDisplay | Gets or sets the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink. |
| Name | Description |
|---|---|
| Delete() | Deletes the hyperlink. Use this method to remove a hyperlink that was added to a cell range or shape. |