Executing Google Apps Script Functions from Mobile

2019-01-18 16:05发布

问题:

I'm developing a interface for a user who uses a google spreadsheet as his database. Nowadays he uses the Google Sheet mobile App (Android and IOs) to update his spreadsheet, and I just can't find any way to create a interface or even call a function on the mobile app. Does anyone knows how can I call a function from the script I've created on the Google Sheets Mobile app? Thanks!

回答1:

You cannot execute Google App Script functions (gas functions) via Google Sheets mobile app.

Alternative #1:

Create Android Add-on

Source: https://developers.google.com/apps-script/add-ons/mobile/

Android add-ons can utilize the Apps Script Execution API to directly call functions in Apps Script projects. This allows Android add-ons to retrieve and manipulate data from a Google Doc or Sheet using standard Apps Script techniques. Just like desktop add-ons, Android add-ons allow you to craft custom user interfaces — but with the full capabilities of the Android platform at your disposal.

Alternative #2

Create a web-app and use Google's Execution API

Source: https://developers.google.com/apps-script/guides/rest/api

The Apps Script Execution API consists of a single scripts resource, which has a single method, run, that makes calls to specific Apps Script functions



回答2:

Custom functions and onEdit triggers work well with the mobile versions of Google sheets.