Forum Discussion

charles983's avatar
charles983
Copper Contributor
May 17, 2023

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...
  • MichelleRanMSFT's avatar
    MichelleRanMSFT
    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.

Resources