Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Apps Script: Get the ID of script bound to a spreadsheet

I want to write a Google Apps Script to generate a list of the IDs of the scripts bound to certain spreadsheets.

I cannot find a way to programmatically, via GAS, get the ID of a bound script.

  • If I have a spreadsheet object, I have methods like getId to get the ID of the spreadsheet, but not the bounded script.

  • Using the DriveApp, I can find standalone scripts using DriveApp.getFilesByType('application/vnd.google-apps.script') but not bound ones!

Any suggestions?

like image 224
Dustin Michels Avatar asked Mar 04 '19 19:03

Dustin Michels


People also ask

What does Spreadsheetapp flush () do?

flush() Applies all pending Spreadsheet changes. Spreadsheet operations are sometimes bundled together to improve performance, such as when doing multiple calls to Range.


1 Answers

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.

Haven't found any Google documentation explicitly on the topic, still hoping this hole gets filled eventually.

like image 106
Cameron Roberts Avatar answered Nov 15 '22 07:11

Cameron Roberts