简体   繁体   中英

Using oAuth2 to send requests to Google Apps Script (i.e. GAS as google API)

I have been looking for a way to interact with my google sheets (and other services) from Excel (and other desktop applications).

For example:

I get a report from a work system and my boss asks me to update the information in the google sheets so that our site is up to date with the latest information. What would be great (and easy for me) would be to use a VBA script in my spreadsheet to turn all my data in http requests and then do the heavy lifting with Google Apps Script in the cloud and finally updating the Google Sheets with the associated API.

When I look at the oAuth2 playground I can't find a way to enable Google Apps script, as I have successfully done so with other APIs.

(to be clear, I don't want to do oAuth2 with in GAS - which is a lot of the other questions that get raised)

Is this a hard problem or is there a solution?

There is currently no way of calling a Google Apps Script from an external program. You do have a few other options:

  1. Import the relevant data into Google Sheets manually and use Google Apps Script to process it as needed, possibly making use of time-based triggers to handle the processing automatically.
  2. Use the Google Spreadsheets API . Unlike Apps Script, this API is built to be called from other programs and can manipulate Google Sheets. However, it is a bit more difficult to use than Apps Script. Once data has been moved into a Google Sheet, a separate Apps Script can be used to manipulate it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM