Hyperlink

Encapsulates the object that represents a hyperlink.

class Hyperlink;

Example

const { Workbook } = require("aspose.cells.node");

//Instantiating a Workbook object
var workbook = new Workbook();
//Adding a new worksheet to the Workbook object
workbook.getWorksheets().add();
//Obtaining the reference of the newly added worksheet by passing its sheet index
var worksheet = workbook.getWorksheets().get(0);
//Adding a hyperlink to a URL at "A1" cell
worksheet.getHyperlinks().add("A1", 1, 1, "http://www.aspose.com");
//Saving the Excel file
workbook.save("output/Hyperlink.xls");

Methods

MethodDescription
getAddress()Represents the address of a hyperlink.
setAddress(string)Represents the address of a hyperlink.
getTextToDisplay()Represents the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink.
setTextToDisplay(string)Represents the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink.
getArea()Gets the range of hyperlink.
getScreenTip()Returns or sets the ScreenTip text for the specified hyperlink.
setScreenTip(string)Returns or sets the ScreenTip text for the specified hyperlink.
getLinkType()Gets the link type.
delete()Deletes this hyperlink
isNull()Checks whether the implementation object is null.

getAddress()

Represents the address of a hyperlink.

getAddress() : string;

setAddress(string)

Represents the address of a hyperlink.

setAddress(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getTextToDisplay()

Represents the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink.

getTextToDisplay() : string;

setTextToDisplay(string)

Represents the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink.

setTextToDisplay(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getArea()

Gets the range of hyperlink.

getArea() : CellArea;

Returns

CellArea

getScreenTip()

Returns or sets the ScreenTip text for the specified hyperlink.

getScreenTip() : string;

setScreenTip(string)

Returns or sets the ScreenTip text for the specified hyperlink.

setScreenTip(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getLinkType()

Gets the link type.

getLinkType() : TargetModeType;

Returns

TargetModeType

delete()

Deletes this hyperlink

delete() : void;

isNull()

Checks whether the implementation object is null.

isNull() : boolean;