Google Apps脚本:获取绑定到电子表格的脚本ID [英] Google Apps Script: Get the ID of script bound to a spreadsheet
问题描述
我想编写一个Google Apps脚本来生成绑定到某些电子表格的脚本的ID列表.
I want to write a Google Apps Script to generate a list of the IDs of the scripts bound to certain spreadsheets.
我找不到通过GAS以编程方式获取绑定脚本ID的方法.
I cannot find a way to programmatically, via GAS, get the ID of a bound script.
-
如果我有
spreadsheet
对象,我有类似getId
的方法来获取电子表格的ID,但不能获取有界脚本.
If I have a
spreadsheet
object, I have methods likegetId
to get the ID of the spreadsheet, but not the bounded script.
使用DriveApp,我可以使用DriveApp.getFilesByType('application/vnd.google-apps.script')
而不是绑定的脚本找到独立的脚本!
Using the DriveApp, I can find standalone scripts using DriveApp.getFilesByType('application/vnd.google-apps.script')
but not bound ones!
有什么建议吗?
推荐答案
不幸的是(根据我自己的研究),这目前是不可能的.几年来,我一直想以编程方式识别和访问绑定脚本,我定期对其进行研究,但我总是空手而归.
Unfortunately (by my own research) this is not currently possible. I have been wanting to programatically identify and access bound scripts for several years, I look into it periodically, I've always come up empty handed.
还没有找到关于该主题的任何Google文档,但仍然希望最终能填补这个空缺.
Haven't found any Google documentation explicitly on the topic, still hoping this hole gets filled eventually.
这篇关于Google Apps脚本:获取绑定到电子表格的脚本ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!