0

As background, we are separating our reporting from one Google Cloud Platform project to another and we have hundreds of Google Sheets which contain Apps Script for pulling data from BigQuery. What we want to do is scan for all our Google sheets and look to see if that sheet contains Apps Script and if it does, what BigQuery view(s) is it running.

This is similar to the tools available to extract VBA Macro source code from MS Office Documents.

In an ideal world I would love to find and replace the project name at the same time but any help to identify the work load would be appreciated.

Thanks, Steve

Steve
  • 119
  • 1
  • 2
  • 8
  • 1
    Ok, so after some more digging, using the "Google Apps Script API" we seem to be able to get the content and even more exciting update the "source" element of an Apps Script scriptId. What I cannot work out is how to I get a list of all my scriptId's? – Steve Mar 14 '19 at 16:39
  • I'm just making a wild guess, but you could try looking in the files' metadata for something that told you that it has/is a bound script. You'd need to use the Drive API, get the files metadata, and then probably look in either the "properties" or "appProperties" element. [Drive API Docs](https://developers.google.com/drive/api/v3/reference/files) Sorry that I don't have the answer, and if it doesn't help, but that's one possibility that I'd look at. – Alan Wells Mar 14 '19 at 18:22
  • See https://stackoverflow.com/questions/54310761/how-to-fetch-script-ids-of-spreadsheet-bound-project https://stackoverflow.com/questions/51120078/gas-get-bounded-script-id-from-another-project https://stackoverflow.com/questions/31181918/get-json-of-container-bound-google-apps-script-through-apps-script-or-download https://stackoverflow.com/questions/29613469/how-to-programmatically-create-a-list-of-google-apps-script-projects-owned-by-me https://stackoverflow.com/questions/54990478/google-apps-script-get-the-id-of-script-bound-to-a-spreadsheet – tehhowch Mar 14 '19 at 18:23
  • Possible duplicate of [Google Apps Script: Get the ID of script bound to a spreadsheet](https://stackoverflow.com/questions/54990478/google-apps-script-get-the-id-of-script-bound-to-a-spreadsheet) – tehhowch Mar 14 '19 at 18:24

0 Answers0