You can build a small UI that does the job like this :
function test(){ showURL("http://www.google.com") } // function showURL(href){ var app = UiApp.createApplication().setHeight(50).setWidth(200); app.setTitle("Show URL"); var link = app.createAnchor('open ', href).setId("link"); app.add(link); var doc = SpreadsheetApp.getActive(); doc.show(app); }
If you want to 'show' the URL, just change this line like this :
var link = app.createAnchor(href, href).setId("link");
EDIT : link to a demo spreadsheet in read only because too many people keep writing unwanted things on it (just make a copy to use instead).
EDIT : UiApp was deprecated by Google on 11th Dec 2014, this method could break at any time and needs updating to use HTML service instead!
EDIT : below is an implementation using html service.
function testNew(){ showAnchor('Stackoverflow','http://stackoverflow.com/questions/tagged/google-apps-script'); } function showAnchor(name,url) { var html = '<html><body><a href="'+url+'" target="blank" onclick="google.script.host.close()">'+name+'</a></body></html>'; var ui = HtmlService.createHtmlOutput(html) SpreadsheetApp.getUi().showModelessDialog(ui,"demo"); }