google-apps-script - 您无权执行该操作。请请求此项目的所有者授予您访问权限
问题描述
我的插件具有将所选图表作为图像从侧边栏中导出到谷歌表格的功能。我已使用其动态分配脚本方法 callbackFunction1() 到生成的图像Assign script
。当我单击图像时,我的附加组件需要加载到侧边栏中。从发布者帐户单击它时工作正常,但是一旦任何其他最终用户单击图像,红色出现以下错误,
You do not have access to perform that action. Please ask the owner of this item to grant access to you.
请查看随附的屏幕截图以供参考。
回调代码为:
function callbackFunction1(){
var key="chart";
var value="bar";
var userProperties = PropertiesService.getDocumentProperties();
userProperties.setProperty(key, value);
SpreadsheetApp.getUi().showSidebar(
HtmlService.createTemplateFromFile('AddonGUI.html').evaluate().setTitle("AddOnTitle")
.setSandboxMode(HtmlService.SandboxMode.IFRAME)
);
}
这个回调方法是自定义函数。
解决方案
推荐阅读
- android - 如何从适配器更新日期到 recyclerView?
- ios - 有没有办法在 iOS 13 和 iOS14 上使用 Float16
- jquery - 通过追加添加新元素时选项卡不起作用
- python - 我的 Django 教程出现 NoReverseMatch 问题
- javascript - 无法编辑具有动态命名属性的 JavaScript 对象:对象文字中缺少属性
- typescript - 如何防止get操作中的嵌套订阅?
- javascript - 下拉元素的 useState - ReactJS
- python - Python pandas DataFrame:检查n个元素是否具有连续值?
- reactjs - API调用数据库后上下文不更新
- r - 像 RStudio 一样缩进 VSCode