访问-绑定到Google表格的脚本 [英] Access - Scripts Bound to Google Sheets

查看:60
本文介绍了访问-绑定到Google表格的脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从绑定脚本的文档中: https://developers.google.com/apps-script/guides/bound

From the documentation of the the bound script: https://developers.google.com/apps-script/guides/bound

只有有权编辑电子表格,文档或表单的用户才能运行其绑定的脚本.只有视图访问权限的协作者无法打开脚本编辑器,即使他们复制了父文件,也会成为副本的所有者,并且可以查看和运行脚本的副本."

"Only users who have permission to edit a spreadsheet, document, or form can run its bound script. Collaborators who have only view access cannot open the script editor, although if they make a copy of the parent file, they become the owner of the copy and will be able to see and run a copy of the script."

此功能有点受限制.我创建了一个供多个用户使用的大表.我需要只读访问用户可执行的脚本.我创建的脚本不会更改文档,因此它不会受到用户访问级别的影响.

This feature is kinda limited. I have created a big sheet that are used by multiple users. I need the script to be executable by Read Only access users. The script that I created are not making changes to the document, so it should not affect by the access level of the users.

  • 管理员具有对文档的编辑"访问权限.他们可以访问所有计算/配置单元/工作表.
  • 管理员对文档具有编辑"权限.经理对大多数单元格/工作表具有编辑"权限.经理的任务是更新单元格
  • 所有其余用户仅具有对文档的只读访问权限.他们可以查看单元格和自动计算.

由于单元格中的列过多,因此我创建了一个按钮(最终我想将其移至onOpen)以便于导航至特定单元格.这是根据今天的日期动态完成的. 对于管理员和管理员(具有编辑"访问权限),此功能可以正常运行,但是对于具有只读"访问权限的其他用户不可用.

Because the cells have too many columns, I have created a button (eventually I want to move it to onOpen) for easy navigation to a specific cell. This is done dynamically based on today's date. This is working fine as expected for Administrator and Manager (have Edit access), however not available for the rest of the users with Read Only access.

有什么解决方法吗?

谢谢

推荐答案

不幸的是没有.你是极端情况. GAS的全部目的是使编辑更容易,并提供工具. Google文档/电子表格/等.通常,操作起来并不难.

Unfortunately not. You are the edge case. The whole point of GAS is to make editing easier, providing tools. A Google document/Spreadsheet/etc. normally isn't THAT hard to maneuver through.

但是,如果您确实希望查看者看到电子表格的特定部分,但不对其进行编辑,则可以尝试制作一个独立的脚本.让它使用电子表格的ID从电子表格中提取数据,然后将其投影到HTML页面上的表或列表中.

However, if your REALLY want viewers to see specific parts of your spreadsheet, but not edit it, you could try making a standalone script. Have it pull data from the spreadsheet using the spreadsheet's id and then project it on the HTML page, in a table or list.

这篇关于访问-绑定到Google表格的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆