Read data from Google sheets

One more question about the topic came to my mind.
is there any way to delete or change entries from within the application?
for example, I see incorrect or redundant information in the downloaded data that I would like to delete or correct this.

What you are talking about is a full CRUD (create/read/update/delete) for your spreadsheet.

A couple of methods:

How to use a Google Drive Google Spreadsheet as Database

CRUD with Google Sheets, Web App and AI2

How you do it will depend if your spreadsheet is public or private

I'll check it.
Thanks again :wink:

I have theoretical question. I want to store lists of different lengths in individual lines of the sheet, one line will have, for example, 5 data (empty fields always at the end of the line) and the other line will have 10 data. Then I will download them to the application and convert csv to lists. Will the lists be of different lengths, one list of 5 items and the other of 10 items? Or maybe both lists will have 10 items, except that the next one will have 5 empty items? I am asking because I know that the csv table also contains empty cells.

I believe you will get a downloaded csv with each line having the number of entries for the longest entry in the sheet:


Consider adding a new sheet to your design, with one row for each additional list item, identified by the key of its owner.

See the Order Item sheet in this Pizza Store sample, built for a (hopefully) upcoming Google Sheets component ...

Having the list items in a separate sheet, lined up in the same column, allows you to do some SQL-like grouping and summation.

Exactly. So the second list will have empty items at the end? Too bad there is no block for removing empty list items :upside_down_face: .

But then you would have an improper csv/listofLists

If you attempted to iterate over a list of lists with different lengths, AI2 would complain....

Suggested reading:
Data Normalization

I followed you but can't look up the data, please help


  • Are you certain your sheet is called sheet1 and not Sheet1 (uppercase S) ?
  • You don't show a query you have tested with
  • Is your script correctly deployed ?
1 Like

Also see:

1 Like

I tried but still can't run

Please check the code for me, and sheet and Sheet (in uppercase and lowercase) I have corrected but still not working

Please check the code for me, and sheet and Sheet (in uppercase and lowercase) I have corrected but still not working

It appears that your sheet is called Sheet but you are sending sheet1 in the blocks

1 Like

Try Sheet, with a capital "S."


I make google sheet data query, i tried my best. however, it still does not work. Can anyone help me see if there is an error, the code, or do I need to install any additional google sheets add-ons?

What query are you trying ?

Are you sure you have your google apps script published and your script url in your app is the same?

1 Like

I've fixed it many times, but still can't get the query. #ERROR announcement!