TRY NEW VERSION

HYPERLINK

Creates a shortcut or jump that opens a document stored on your hard drive, a network server, or on the Internet.

Parameters:

Name Type Description
arg1 string

Is the text giving the path and file name to the document to be opened, a hard drive location, UNC address, or URL path.

arg2 any

Is text or a number that is displayed in the cell. If omitted, the cell displays the Link_location text.

Returns:

Type
number | string | boolean

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.HYPERLINK("https://example.com/files/example.xlsx", "Click here"));
builder.SaveFile("xlsx", "HYPERLINK.xlsx");
builder.CloseFile();

Resulting document