将脚本插入多个Google Spreadsheets [英] Insert a script into multiple Google Spreadsheets

查看:53
本文介绍了将脚本插入多个Google Spreadsheets的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名业余编码员-我实际上只是做一些事情来使我的生活更轻松.我在学校设置了Google表单和电子表格来跟踪不同年级的学科问题.我编写了一个简短的脚本,该脚本通过电子邮件将任何提交内容通知适当的人员,并且可以筛选和创建有关选定学习者的报告.

I am an amateur coder - I really only do a few things to make my life easier. I set up Google Forms and Spreadsheets for tracking discipline problems in different grades at my school. I wrote a short script that notifies the appropriate people by e-mail of any submission and that can filter and create reports about selected learners.

由于我进行DIY编码(英语和法语的老师,所以我没有学习编程),所以我经常想出一些改进,这些改进从一开始就应该是显而易见的.我真的不想复制脚本改进并将其粘贴到每个电子表格的脚本编辑器中.我已将此脚本作为独立文件复制到Google云端硬盘中,但是我无法将其插入任何电子表格中,因为图库只能访问已发布的脚本/应用.有没有解决的办法?我已经看到过使用库的提法,但是我什至不知道从哪里开始.您可以在Google云端硬盘中将脚本创建为独立脚本,但实际上并未使用它.

Because I do DIY coding (English and French teacher, so I did not study programming), I often come up with some improvement that should have been obvious from the start. I really do not want to copy and paste the script improvement into every spreadsheet's script editor. I have copied this script as a stand-alone file in Google Drive but I cannot insert it into any of the spreadsheets because the gallery only has access to published scripts/apps. Is there a way around this? I've seen mentions of using libraries, but I have no clue even where to begin. It feels a bit silly that you can create a script as a stand-alone in Google Drive but not actually use it.

任何帮助将不胜感激.

推荐答案

此问题最初是在不久前提出的,而Google的解决方案是库"功能.

This was initially raised as a problem a while ago, and Google's solution was the "libraries" feature.

所以您将要

  1. 您必须保存项目的版本.文件>管理版本...
  2. 然后进入文件">项目属性"并复制项目密钥.
  3. 然后,在所有其他电子表格中,您必须进入脚本编辑器",然后进入资源">管理库".然后从上方粘贴项目密钥,并将其添加到该电子表格脚本中.

没有自动的方法可以完成此任务.为了使脚本可以在任何电子表格上运行,您必须进入每个电子表格的脚本编辑器.

There is not an automated way to accomplish this. In order to have a script run on any spreadsheet, you must go into the Script Editor for each spreadsheet.

来源

这篇关于将脚本插入多个Google Spreadsheets的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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