App Inventor & Google Sheets

Yes.

We must first assume that your spreadsheet is set to share as “anyone with the link”.

As you have found, to get the first sheet returned you can use this url (dummy fileID):

https://docs.google.com/spreadsheets/d/1mpC--JsHI9sdo9RDbLUGwTT_eoaV0DlgQKFsV3NJKk/export?format=csv

To call the data in a different sheet, you need the gid number for that sheet. The gid number can be found in the url address bar when you are viewing that sheet, and you add it to the end of the url. If, for example, you have a second sheet named Sheet2 and the gid number in the address bar is : 2131997720, then the url you need to download the data for the sheet named Sheet2 is:

https://docs.google.com/spreadsheets/d/1mpC--JsHI9sdo9RDbLUGwTT_eoaV0DlgQKFsV3NJKk/export?format=csv&gid=2131997720

You can go a step further if you only want a specific range, for example A2:B5, and add the range to the url as well:

https://docs.google.com/spreadsheets/d/1mpC--JsHI9sdo9RDbLUGwTT_eoaV0DlgQKFsV3NJKk/export?format=csv&gid=2131997720&range=A2:B5

1 Like