如何制作应用程序脚本以立即允许访问 Google 电子表格中的所有导入元素? [英] How can I make an apps script to instantly allow access to all imported elements in a Google Spreadsheet?

查看:14
本文介绍了如何制作应用程序脚本以立即允许访问 Google 电子表格中的所有导入元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用谷歌电子表格.我正在使用一些模板电子表格,其中都包含许多指向其他电子表格的链接.问题是,每当我复制模板电子表格以使用大部分链接(使用 importrange 函数创建)时,我都需要再次授予它们访问权限

I have to work with google spreadsheets. I am using some template spreadsheets which all contain a lot of links to other spreadsheets. The problem is that whenever I make a copy of the template spreadsheet to use most of the links(created with the importrange function) require me to give them access again

我想做的是制作一个脚本,让我可以一次性导入所有链接.我试图制作一个应用程序脚本,但我找不到任何方法来访问带有允许访问"按钮的文本框,以便我可以制作我的脚本.我的问题是:有没有办法以编程方式访问允许访问"按钮?或者有没有其他方法可以解决我的问题并允许一键访问所有链接?

What I want to do is make a script that would allow me to import all the links in one press. I tried to make an app script but I can't found any way to access the textbox with the "allow access" button so that i can make my script. My questions are: is there any way to access the "allow access" button programatically? or is there any other way to solve my problem and allow access to all links in one press?

推荐答案

好吧,我所做的并没有真正解决问题,但很有帮助.我将我想要的所有电子表格的范围导入到第三个电子表格中.然后我将该范围导入到我的模型中.因此,当创建新文件时,您只需允许访问一个电子表格而不是多个电子表格.

Well, what I've done doesn't really solve the problem, but helps a lot. I imported the range of all Spreadsheets I wanted to a third Spreadsheet. Then I imported that range to my model. So, when a new file is created, you only have to allow access to one Spreadsheet instead of many.

正如我所说,它不能解决问题,但它是一个很好的解决方法.

As I said, it doesn't solve the problem but it is a nice workaround.

这篇关于如何制作应用程序脚本以立即允许访问 Google 电子表格中的所有导入元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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