-
-
Save Novack/767945bfee87e7574b8b13a4350e63bc to your computer and use it in GitHub Desktop.
google apps script to open a new website in a new window
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function openTab() { | |
| var selection = SpreadsheetApp.getActiveSheet().getActiveCell().getValue(); | |
| var html = "<script>window.open('" + selection + "');google.script.host.close();</script>"; | |
| var userInterface = HtmlService.createHtmlOutput(html); | |
| SpreadsheetApp.getUi().showModalDialog(userInterface, 'Open Tab'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment