1

My script is changing the value of a cell from a static value to a formula:

=hyperlink("https://docs.google.com/document/d/someID/edit?usp=drivesdk","static value")

Set by a google app script:

cell.setFormula("=hyperlink(\""+file.getUrl()+"\";\"" + cell.getValue() + "\")");

However, the cell is not a link. When I rightclick the cell, I do get an option to Convert to link. When I click this, I get the result I want (cell text = blue and I'm able to open the link by clicking it).

Can I do this step of converting to a link by use of Google App Scripts?

Casper
  • 1,435
  • 10
  • 22
  • I just tried setFormula it works perfectly with hyperlink! – Nitin Dhomse Mar 29 '18 at 11:32
  • do you want set formula on edit? – Nitin Dhomse Mar 29 '18 at 11:32
  • It did work for me 2 days ago as well but without making any changes to code or whatsoever it decided not to automatically link anymore. The `cell.setFormula(...)` is located in a function that is called by clicking a button. – Casper Mar 29 '18 at 13:25
  • You may refer with this [thread](https://stackoverflow.com/questions/46301490/how-to-create-hyperlink-to-range-in-google-sheets-app-script). You may use the `HYPERLINK` function wherein it is built and appended to a cell. Also, if you think this is a bug, you can file it here: https://issuetracker.google.com/issues/new?component=191640&template=823905 – abielita Mar 29 '18 at 16:53

0 Answers0