Open a page in new tab
Fri Feb 25 2022 19:17:10 GMT+0000 (Coordinated Universal Time)
Saved by
@massa
function openPPCDashboard() {
var js = " \
<script> \
window.open('PASTE_DOC_URL_HERE', '_blank'); \
google.script.host.close(); \
</script> \
";
var html = HtmlService.createHtmlOutput(js)
.setHeight(10)
.setWidth(100);
SpreadsheetApp.getUi().showModalDialog(html, 'Now loading.'); // If you use this on Spreadsheet
// DocumentApp.getUi().showModalDialog(html, 'Now loading.'); // If you use this on Document
// SlidesApp.getUi().showModalDialog(html, 'Now loading.'); // If you use this on Slides
}
content_copyCOPY
Google Sheets. SpreadsheetApp.openByID() and .openByUrl() didn't work by default (see pop-up hint by google when start input "(")
https://stackoverflow.com/questions/21813699/open-google-spreadsheet-via-google-apps-script
Comments