Search code examples
androidgoogle-sheetsapp-inventor

How to take last row from Google Spreadsheet to the MIT App Inventor App?


I made very similar solution by using Javascript in HTML document. Basicaly javascript code take last row (last data) from the Google Spreadsheet to the HTML page. So the page is always up to date.

Now I try to make similar thing by MIT App Inventor. Maybe ActivityStarter can solve it. On the internet there is no solution. So it'd be great if we find something here.


Solution

  • You can't do this with the Activity Starter

    You have 2 possibilities

    1. you can adjust your HTML/JavaScript solution and use it together with the Webviewer component. Just return the result back to App Inventor in the WebViewString property, see also How does the property Webviewer.WebViewString work?, or
    2. use the Web component together with the Google Visualisation API, see also my example here

    Edit: If you want to follow #2, then probably the easiest way is to add another datetime column and sort the result by that column to get only the last row as result (assuming, that datetime column is column A), see again the Reference:

    ORDER BY A DESC LIMIT 1