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.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
workbook.save("output/Hyperlink.xls");

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
getAddress()@deprecated. Please use the ‘address’ property instead. Represents the address of a hyperlink.
setAddress(string)@deprecated. Please use the ‘address’ property instead. Represents the address of a hyperlink.
getTextToDisplay()@deprecated. Please use the ’textToDisplay’ property instead. Represents the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink.
setTextToDisplay(string)@deprecated. Please use the ’textToDisplay’ property instead. Represents the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink.
getArea()@deprecated. Please use the ‘area’ property instead. Gets the range of hyperlink.
getScreenTip()@deprecated. Please use the ‘screenTip’ property instead. Returns or sets the ScreenTip text for the specified hyperlink.
setScreenTip(string)@deprecated. Please use the ‘screenTip’ property instead. Returns or sets the ScreenTip text for the specified hyperlink.
getLinkType()@deprecated. Please use the ’linkType’ property instead. Gets the link type.
delete()Deletes this hyperlink
isNull()Checks whether the implementation object is null.

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;

getAddress()

@deprecated. Please use the ‘address’ property instead. Represents the address of a hyperlink.

getAddress() : string;

setAddress(string)

@deprecated. Please use the ‘address’ property instead. Represents the address of a hyperlink.

setAddress(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getTextToDisplay()

@deprecated. Please use the ’textToDisplay’ property instead. Represents the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink.

getTextToDisplay() : string;

setTextToDisplay(string)

@deprecated. Please use the ’textToDisplay’ property instead. 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()

@deprecated. Please use the ‘area’ property instead. Gets the range of hyperlink.

getArea() : CellArea;

Returns

CellArea

getScreenTip()

@deprecated. Please use the ‘screenTip’ property instead. Returns or sets the ScreenTip text for the specified hyperlink.

getScreenTip() : string;

setScreenTip(string)

@deprecated. Please use the ‘screenTip’ property instead. Returns or sets the ScreenTip text for the specified hyperlink.

setScreenTip(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getLinkType()

@deprecated. Please use the ’linkType’ property instead. Gets the link type.

getLinkType() : TargetModeType;

Returns

TargetModeType

delete()

Deletes this hyperlink

delete() : void;

isNull()

Checks whether the implementation object is null.

isNull() : boolean;