A csv list instead of multiple variables


I want to use a csv list instead of numerous variable in web request
i am stuck to translate the list in my google apps script


can you explain better your goal ?


perhaps it's wrong thing but i want to send to my app
ten data in spite of use var1, var2, var3 etc
i made a list and send it to my app
in my app i know the order of the data so i might use them as i want
how can i retrieve data (perhaps a function like split ?°

Here is a simple demo to show you how to work with csv. There are two types a csv row and a csv table, these have to be handled differently to get the items out.






simplecsv.aia (3.3 KB)


in 2 cases you got an array :
first 1 D
second 2 D
it's not the same to read it in my web app....


Why not show some example data?

Your csv will either be a row or a table.....

i just use the block : list to csv row
(cola, sandwich, toyota, cat, blue) =>("cola", "sandwich","toyota","cat","blue")
instead of using a variable for each i would like use a list
but arrived in my web app how to "treat" this ?

I have added a third variant:






Label1 show the selection of an item from the list.

You would use these blocks as a replacement for your variable:


Hi Em

Does the csv change often or is it just the current way the data is stored? I ask because that data could be a Block List in App Inventor, no csv file required.


i use a list to export data to google sheets
i don't want to use it in app inventor

This isn't making much sense....

please show your relevant blocks, indicating where you need to input from this "csv"....

hi every body
thanks for helping me
i do explain in a wrong way
what i want ? is sending a comma separated value to my web app
my data is "cola";"sandwich";"toyota";"cat";"blue"

i saw this post it's about list and i can't use it



What is your web app? What does it do with the data it receives?

in this part is just displays this data in columns

i try this :

var test= eval("["+ e.parameters.dat +"]");

var a= test [1] ;
var b= test [2] ;
var c= test [3] ;


it doesn't work

It is a google apps script setting data to a google sheet ?

If you are only sending three data items:


in the web app script:

function doGet(e) {
var ss = SpreadsheetApp.getActive();
var sh = ss.getSheetByName('<NAME OF YOUR SHEET>');

var x = e.parameter.item1;
var y = e.parameter.item2;
var z = e.parameter.item3;


If you change your web app script:

1 Open the script project
2 Go to Publish
3 Deploy as Web App
4 Project version: - select New from the dropdown
5 Execute the app as: your google account address (email)
6 Who has access to the app: Anyone, even anonymous
7 Press the Update button

You have to do this EVERY TIME you change your script

thanks TIMAI2 i know how to send 2 or 3 data
this time i have to send 25 data it's why i thought put it in a list
i think i have to learn something new ...

Follow this guide:

Export CSV data (multiple data) to Google Sheet

1 Like


thanks for your support
logic was there but i did two errors :slight_smile:
I like to check what I'm doing with "call show alert notice" blocks but I forgot to store the result in a variable
on the other hand i forgot(one more time) a symbal equal in the request
everything is ok


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.