Google Apps脚本,脚本已完成但未返回任何内容 [英] Google Apps Script, script completed but did not return anything
问题描述
我分享了一个应用程序,我正在处理有链接的任何人,但我无法以不同的用户身份访问该应用程序。
以下是应用链接: https://script.google.com/macros/s/AKfycbxjdyMyvIF8aYDBPurTi4VgVBP8PiiS76vh3mJXKCtFmljdmChK / exec
以下是我使用类似设置共享的示例应用链接: https://script.google.com/macros/s/AKfycbwTM_gkT62IqpKjG52ZMh6LWo-gBKZyfcpmrrqNavdiuC71KsNv/exec
应用程序部署设置:
*执行应用程序:my_email@gmail.com
谁有权访问应用程序:任何人
该应用程序使用ScriptDB。*
我的应用程序将如果最终无法公开访问,则无用。您的建议将非常感谢。
问题在于 doGet $ c $函数在你的代码中不会返回任何东西,它应该返回一个新的应用程序实例或HTML内容,就像文档。您必须按以下方式更改
doGet
函数。
函数doGet(e){
// ...
return html;
}
I've shared an App i'm working on with "Anyone who has the link", yet i can't access the app as a different user.
Here's the App link: https://script.google.com/macros/s/AKfycbxjdyMyvIF8aYDBPurTi4VgVBP8PiiS76vh3mJXKCtFmljdmChK/exec Here's a sample App link i shared with similar settings that worked: https://script.google.com/macros/s/AKfycbwTM_gkT62IqpKjG52ZMh6LWo-gBKZyfcpmrrqNavdiuC71KsNv/exec
App Deployment Settings:
*Execute the app as: my_email@gmail.com
Who has access to the app: Anyone
The app uses ScriptDB.*
My App will be useless if it can't be eventually accessed publicly. Your suggestions will be very much appreciated.
The problem is that the doGet
function in your code returns nothing and it should return a new app instance or HTML content, like in the Documentation. You have to change the doGet
function in the following way.
function doGet(e){
//...
return html;
}
这篇关于Google Apps脚本,脚本已完成但未返回任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!