Hyperlink

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

PropertyTypeDescription
addressstringRepresents the address of a hyperlink.
textToDisplaystringRepresents the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink.
areaCellAreaReadonly. Gets the range of hyperlink.
screenTipstringReturns or sets the ScreenTip text for the specified hyperlink.
linkTypeTargetModeTypeReadonly. Gets the link type.

Methods

MethodDescription
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;