With this extension, the blocks and the google apps script will only use the google drive and google sheets stored on the developers google drive - the one who sets up the apps script. This removes the need for any authentication, but does have privacy issues for users.
You will be able to perform some basic drive functions to create folders and sheets, and then a wide range of sheets functions to allow for full CRUD functionality (Create,Read,Update,Delete), and much more, on google sheets. By using a google apps script, you can work with private or public spreadsheets.
Latest Version: 2.1
Tested: This has been tested on App Inventor 2 using Android 10 and 13 devices, companion 2.65, and compiled apk. It may work on other derivatives....e.g. Kodular/Niotron/etc.
Released: 28 March 2022
Last Updated: 29 January 2023
Built: Using the Rush Extension Builder by @shreyash
V2.1 Update: added two variants of the AppendRow block
When working with ranges, rows and columns, please pay particular attention to the list structure format requested for each type. This is shown in the blocks (selectionIndex 18 - for example). Ensure you have ShowListsAsJson ticked in your Screen1 Designer properties. In general, the data returned from the script is a stringified JSON, you can use the parse block in the extension to convert this to an AI2 list.
Once you have created your new apps script, delete anything in Code.gs and paste everything in the above txt file. Save, then publish as a web app, with "Me - your google account" and access to Anyone/Anyone even anonymous. Get the script url for use in your app.
The extension will only work once the google apps script is in place GSConnected
Enjoy , and all feedback, comments and ideas for further development welcome.
Available for use in any MIT AppInventor projects or competitions
#####################################################################
This work by TIMAI2 is licensed under a Creative Commons Attribution-ShareAlike 4.0 Unported License with attribution.
Please use name = TIMAI2 and link to this source page when giving credit.
#####################################################################
A page or tab within a spreadsheet. A Sheet resource represents each sheet and has a unique title and numeric sheetId value. You can find the sheet ID in a Google Sheets URL:
The spreadsheet file ID = 1IdpGILd7Nii8nq5yb2Uq3kVFyyL50eo5la2xbDN1Cok
The gid (gridId) = 0
This is the default gid for the first sheet in a spreadsheet when the spreadsheet is created.
Additional sheets (grids) will have a longer number for their gid, e.g. 331107384
The sheetName = Sheet1
for the first sheet in a spreadsheet when the spreadsheet is created. The user can rename it as they wish. This is shown on the spreadsheet along the bottom, as indicated by @oseamiya and @dora_paz above, and here below
The extension requires a SpreadsheetId and a SheetName. These can be set in the Designer, or with blocks at runtime.
But how can I assign the value (text) to a variable ?
It is a void method according to the image right ?
Edit : OK I just saw the GetFunctionOutput()
But could you make this as a value returning block in the next update ?
Cuz it becomes quite complicated to get the variables to the exact values. (I know a way though, but still it becomes quite harder.)