google-sheets - How do I protect a shared google sheet with and still allow the script button to work?
问题描述
I have a sheet that is shared with quite a few people. They are supposed to fill in 5 cells, click the script button and it will insert the text below and sort it by date.
I created the script and assigned it to the button for this.
I need to protect the entire sheet except the 5 cells and the button.
When I add the protection nobody can click on the button. Is there a workaround?
解决方案
回答:
您可以使用受保护的范围来保护工作表不被编辑,但预定义的单元格除外。
脚步:
Data > Protected sheets and ranges
按照表格用户界面中的菜单项进行操作。- 单击
+ Add a sheet or range
新打开的侧边栏中的按钮。 - 单击
Sheet
选项卡。 - 选择您希望保护的工作表。
- 单击 (✓)标记
Except certain cells
复选框,并以 A1 表示法选择您希望用户编辑的 5 个单元格。例如D1:D6
. - 点击
Ok
- 点击
Set permissions
- 在下拉列表中保持
Restrict who can edit this range
选中状态,然后按。Only you
Done
这已经足够了 - 从这里您共享工作表的任何人都将拥有对您在例外规则中指定的特定五个单元格的编辑权限。只要用户已经验证了作为他们运行的功能,该按钮也是可点击的。
参考:
推荐阅读
- python - 如何用 Sympy 绘制点?
- ios - 二进制文件中没有架构。Lipo 未能检测到捆绑可执行文件中的任何架构 - 以前的答案不起作用
- java - Java线程中的BufferedWriter.append安全吗?
- python - django 列不存在,但没有 models.py,也没有找到任何更改
- r - 给定逻辑条件沿同一列的操作
- javascript - 如何使用 Tabs API 在 Material-UI 中水平对齐选项卡标签和选项卡图标
- python - 在递归函数中返回中间值是python的怪癖吗?
- ios - 强制 Firebase 使用蜂窝连接 [iOS]
- c++ - 这个成员函数属于哪个类?面向对象
- ruby-on-rails - 无法在测试中运行 ActionMailer 断言?