Forum Discussion
charles983
May 17, 2023Copper Contributor
Office scripts formulas auto updating other formulas
I am currently writing an excel script that populates a table. I am trying to add a hyperlink to one of the columns; however, when I add the hyperlink via a setValue or a setFormula function, the ver...
- May 19, 2023
charles983 Glad to hear that worked! You can specify the text to display like this:
table.getRange().getCell(i + 1, 3).setHyperlink({ address: "https://help.examplesite.com/tickets/" + jsonData[0][0][i]['ticket_id'], textToDisplay: "text here" })
Using multiple lines isn't necessary but it does help make the code more readable.
charles983
May 18, 2023Copper Contributor
Office scripts is telling me that the setHyperlink function does not exist.
NikolinoDE
May 19, 2023Gold Contributor
table.getRange().getCell(i + 1, 3).setFormula('=HYPERLINK("https://help.examplesite.com/tickets/' + jsonData[0][0][i]['ticket_id'] + '")');
I'm not so sure, but try this code if other options don't work.