如何让onEdit函数影响Google表格中受保护的单元格? [英] How to allow onEdit function to affect protected cell in a Google Sheet?

查看:89
本文介绍了如何让onEdit函数影响Google表格中受保护的单元格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张保护范围的表,因此任何具有链接的用户都可以编辑列A,并且可以通过一个onEdit()函数根据其输入进行写入,该列表受保护,因此只有在登录后才能对其进行编辑。

I have a sheet that has protected ranges so any user with the link can edit column A, and an onEdit() function that writes to column B based on their input which is protected so only I can edit it when logged in.

这个保护措施可以防止onEdit()对匿名用户做它的事情,所以列B从来没有设置它的值。

This protection prevents the onEdit() from doing its thing for anonymous users so column B never has its value set.

你怎么能覆盖这个?我喜欢excel允许的方式。

How can you override this? I like the way excel allows this.

推荐答案

您可以使用可安装触发器在编辑时运行。这样的触发器就像创建它的用户一样运行,而不管其编辑是否导致它运行。因此,如果您是触发器的创建者,并且您的帐户有权编辑受保护的单元格,则它们将被更新。

You can use an installable trigger running on edit. Such a trigger runs as the user who created it, regardless of whose edit caused it to run. So, if you are the creator of the trigger and your account is authorized to edit protected cells, they will be updated.

这篇关于如何让onEdit函数影响Google表格中受保护的单元格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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