Get Data From Spreadsheet

Hello everyone,

the first, i'm sorry i know this topic has many discussion on this site, but until now i'm still don't understand to get data from google sheet, the condition i got from read the other discussion is :

  1. Change the google sheet to share everyone
  2. Make an AppScript and Deploy or Publish until got the Deploy UrL
  3. Start the block in AI2

anyone can explain me step by step to doing that ? include the Code of AppScript

If your google sheet is shared "anyone with the link", then you do not need an apps script web app to "GET" the data from the sheet.

Just use the "export?format=csv" method or a gviz query

ok got it

one question again, how to count number of row in google sheet if use the "export?format=csv" method ?
can you help me to give example for gviz query

GVIZ Guide

When the data is returned in the Web1.GotText block the responseContent will contain a csv table. You convert this to an AI2 list using "the list from csv table" block. This will give you a list of lists. Use the "length of list" block to get the number of rows returned.

can you give example for "You convert this to an AI2 list using "the list from csv table" block" ?

1 Like


i still dont get it the number of row

Set your responseContent to a label, what do you see ?

1 Like

number of row from google sheet sir

I Got It

Case Closed. Thanks Sir @TIMAI2

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