Google apps script 通过google应用程序脚本打开电子表格
我一直试图通过以下代码打开一个现有的电子表格,它没有给出任何错误,但也没有打开电子表格 在这方面有人能帮忙吗Google apps script 通过google应用程序脚本打开电子表格,google-apps-script,Google Apps Script,我一直试图通过以下代码打开一个现有的电子表格,它没有给出任何错误,但也没有打开电子表格 在这方面有人能帮忙吗 function myFunction() { var js = " \ <script> \ window.open('https://docs.google.com/spreadsheets/d/1xkStjPEUy6C7ZAaZhTL4DFyDjZnKciHCb7RteZ3vtB8/edit?usp=sharing'); \
function myFunction() {
var js = " \
<script> \
window.open('https://docs.google.com/spreadsheets/d/1xkStjPEUy6C7ZAaZhTL4DFyDjZnKciHCb7RteZ3vtB8/edit?usp=sharing'); \
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
}
函数myFunction(){
var js=”\
\
打开窗户https://docs.google.com/spreadsheets/d/1xkStjPEUy6C7ZAaZhTL4DFyDjZnKciHCb7RteZ3vtB8/edit?usp=sharing'); \
google.script.host.close()\
\
";
var html=HtmlService.createHtmlOutput(js)
.设置高度(10)
.设置宽度(100);
SpreadsheetApp.getUi().showModalDialog(html,“正在加载”);//如果在电子表格上使用此选项
}
由窗口打开的URL。打开的通常被弹出窗口阻止程序阻止。您可以直接显示一个链接,供用户单击或禁用弹出窗口阻止程序
另请参见尝试删除.close()
删除后。close()仍然没有发生任何事情。请禁用浏览器中的弹出窗口阻止程序