Hyperlink
Contents
[
Hide
]Hyperlink class
Encapsulates the object that represents a hyperlink.
class Hyperlink;
Example
const { Workbook, SaveFormat } = AsposeCells;
//Instantiating a Workbook object
var workbook = new Workbook();
//Adding a new worksheet to the Workbook object
workbook.worksheets.add();
//Obtaining the reference of the newly added worksheet by passing its sheet index
var worksheet = workbook.worksheets.get(0);
//Adding a hyperlink to a URL at "A1" cell
worksheet.hyperlinks.add("A1", 1, 1, "https://www.aspose.com");
//Saving the Excel file
var uint8Array = workbook.save(SaveFormat.Xlsx);
Properties
Property | Type | Description |
---|---|---|
address | string | Represents the address of a hyperlink. |
textToDisplay | string | Represents the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink. |
area | CellArea | Readonly. Gets the range of hyperlink. |
screenTip | string | Returns or sets the ScreenTip text for the specified hyperlink. |
linkType | TargetModeType | Readonly. Gets the link type. |
Methods
Method | Description |
---|---|
delete() | Deletes this hyperlink |
address
Represents the address of a hyperlink.
address : string;
textToDisplay
Represents the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink.
textToDisplay : string;
area
Readonly. Gets the range of hyperlink.
area : CellArea;
screenTip
Returns or sets the ScreenTip text for the specified hyperlink.
screenTip : string;
linkType
Readonly. Gets the link type.
linkType : TargetModeType;
delete()
Deletes this hyperlink
delete() : void;