[英]How do I copy a script from one spreadsheet to another spreadsheet?
I need to copy an existing script, which I did not write, into my existing spreadsheet. 我需要将没有写的现有脚本复制到现有电子表格中。 The script is called "SaveBack", and can be found here: https://docs.google.com/a/levelgroup.com/spreadsheet/ccc?key=0Agcb8bUVVOOodHhoV3BrRGZ6UEdSYnVLSEk3bllxRnc#gid=1 .
该脚本称为“ SaveBack”,可以在以下位置找到: https ://docs.google.com/a/levelgroup.com/spreadsheet/ccc?key=0Agcb8bUVVOOodHhoV3BrRGZ6UEdSYnVLSEk3bllxRnc#gid =1 。
My existing spreadsheet is too complex (it has many other spreadsheets that link to it) to copy all of its sheets into the spreadsheet that contains the script. 我现有的电子表格太复杂了(它有许多其他电子表格链接到它)以至于无法将其所有工作表复制到包含脚本的电子表格中。 I have already copied the SaveBack editor sheet template sheet to my main spreadsheet, but I can't figure out how to copy the SaveBack script that goes along with it into my spreadsheet.
我已经将SaveBack编辑器工作表模板工作表复制到了我的主电子表格中,但是我不知道如何将随附的SaveBack脚本复制到我的电子表格中。
Can anyone help? 有人可以帮忙吗? Thanks!
谢谢!
Open the save back script, select the script text, copy it, go to your sheet, create a new script (blank template), paste the script you copied into your new script, name is SaveBack (assuming it's a project), check the triggers on the original script and make sure your triggers match, and you should be good to go. 打开保存回脚本,选择脚本文本,将其复制,转到工作表,创建一个新脚本(空白模板),将复制的脚本粘贴到新脚本中,名称为SaveBack(假设它是一个项目),检查原始脚本上的触发器,并确保触发器匹配,那么您应该一切顺利。 You will have to change any sheet, document, or other string ID's to match your files' Id's, but that isn't too bad.
您将必须更改任何工作表,文档或其他字符串ID以匹配文件的ID,但这还不错。
I do this sort of thing all of the time when I'm migrating things back and forth between my work and personal account. 当我在工作和个人帐户之间来回迁移时,我总是会做这种事情。 You could also create a copy of the other person's spreadsheet that you linked above, and it will move the script over with it.
您也可以在上面链接的其他人的电子表格中创建一个副本,它会将脚本移到上方。 Then you can go to the script and get the project key to use it as library in your own scripts.
然后,您可以转到脚本并获取项目密钥,以将其用作您自己的脚本中的库。 Since you're using your copy as the library, you don't have to worry about someone else changing the script and breaking your functionality.
由于您将副本用作库,因此不必担心其他人更改脚本并破坏功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.