HYPERLINK
function HYPERLINK(arg1: string = null, arg2: any = null): number | string | boolean
Description
Creates a shortcut or jump that opens a document stored on your hard drive, a network server, or on the Internet.
Parameters
- arg1
string
null 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
null Is text or a number that is displayed in the cell. If omitted, the cell displays the Link_location text.
Returns
number | string | boolean
Try It
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.HYPERLINK("https://example.com/files/example.xlsx", "Click here"));