0

我有一个脚本(电子表格脚本),他在电子表格中写入一系列数据,但电子表格的某些部分被锁定。

从电子表格运行此脚本的用户在某些区域被阻止,脚本有可能释放这些区域然后再次锁定它们或以电子表格的管理员身份运行?

谢谢你。

4

1 回答 1

1

The user would need to have permission to edit sharing on the Spreadsheet, which would not be the case if it was locked.

Is the script an onEdit trigger? If so, you can add a trigger from the script editor that will run as yourself. Just make sure to rename onEdit() to something else so it doesn't try to run as the regular user as well.

If this isn't onEdit, I would suggest making the function they call add a specific value to a specific cell. Then you can have a timed trigger every minute running as yourself that watches this cell and does its work when the cell contains the specific word. Just make sure to clear the cell quickly so it doesn't run twice.

于 2013-01-07T17:53:03.657 回答