Export CSV data (multiple data rows) to Google Sheet
I have since come up with another method, which helps to reduce the number of calls to the apps script and the spreadsheet
If you want to, for what ever reason, upload your data and place it in the next column, instead of the next row, you can use this script:
I took the quick route using appendRow. If we know the size of the data (e.g. number of columns and rows), which we can get with google apps script, then it is possible to paste the entire dataset in one call.
From our lists in Appinventor we create suitably formatted strings for each “column” (e.g. ID or NAME) and send the entire string to the webapp as a single parameter. You can of course pull in a csv file using the file component.
My simple example only handles two columns of data, an ID and a NAME To add more, amend the blocks in AppInventor and edit the web app script (remembering to republish!)
Modern browsers should be able to cope with very long uris, but I have put in a check on the response code just in case. I stress tested the method using a csv table of 6 columns and 100 entries, so 600 pieces of data. The sheet populated in under 5 seconds!