简体   繁体   English

电子表格中的Google脚本

[英]Google Scripts in Spreadsheet

Is there a way to have a spreadsheet in Google Drive where the script is protected from modification / editing? 有没有一种方法可以在Google云端硬盘中创建电子表格,以防止脚本被修改/编辑? Does anyone know if that is an option in the Script editor? 有人知道脚本编辑器中是否提供该选项吗?

Another thing I'd like to ask. 我想问的另一件事。 How does one do source control for the codes in their Google scripts? 如何对其Google脚本中的代码进行源代码控制?

Thanks. 谢谢。

WRT privacy / protection of scripts: Refer to the comments and answers on this question: How to protect the Apps Script code in a Google spreadsheet? WRT隐私/脚本保护:请参考以下问题的评论和答案: 如何保护Google电子表格中的Apps脚本代码? .

Source Control? 源代码控制? See Backing up Gapps source . 请参阅备份Gapps源 The version tracking in the script editor is rudimentary, so you should consider doing source control outside - you'll have to get used to copy & paste. 脚本编辑器中的版本跟踪是基本的,因此您应该考虑在外部进行源代码控制-您将不得不习惯于复制和粘贴。

No you can't do it. 不,你做不到。

The script runs with the document permissions. 该脚本以文档权限运行。

If you have Edit permissions on the document, you have edit permission on the script too. 如果您对文档具有“编辑”权限,那么您也对脚本具有“编辑”权限。

Here's the Google spreadsheet developer guide. 这是Google电子表格开发人员指南。

https://developers.google.com/apps-script/reference/spreadsheet/ https://developers.google.com/apps-script/reference/spreadsheet/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM