Call data from ggsheet starting from any row

I have 2 questions to ask everyone:

  1. If I want to call the data in googlesheet starting from the nth row onwards, how should I use the URL? (https://docs.google.com/spreadsheets/d/IDDD/gviz/tq?tqx=out:csv&&tq=)???
  2. I want to call data from sheet2 of googlsheet, what is the URL like? (https://docs.google.com/spreadsheets/d/IDDD/gviz/tq?tqx=out:csv&sheet=Sheet2)???
    Please help me about the URL!
    Thank you!

to do this, you should use this script code
you will get succeed

I feel without script code it is not possible… I feel good to call all the data at a time with web url into a variable… and from the variable you can take the data from nth row or colum will be better option for you

1 Like

See

As for

You could call all and make a procedure to only show items from nth row to …

See here:

You can use the sheet name or the gid to return data from a specific sheet.

To SELECT from your nth row, your data will need to be indexed (a column with numbers) so for example, you can SELECT * WHERE A > n

Here is an arrayformula you can use to automatically index your data

1 Like

I used: /gviz/tq?tqx=out:csv&&tq=SELECT where A>2, but it didn’t work.
I used: gviz/tq?tqx=out:csv&&tq=, the default is to get from row 1, I want it to get from row 3, or any other row of my choice.

Use this if it can help you.

You forgot *

SELECT * WHERE A > n

Use only & not &&

And select * where A

1 Like

On this example data:

image

  • …gviz/tq?tqx=out:csv&sheet=Sheet2&tq=SELECT *

returns

"Index","A","B","C"
"1","123","456","789"
"2","abc","def","ghi"
"3","234","345","567"
"4","bcd","cde","def"
  • …gviz/tq?tqx=out:csv&sheet=Sheet2&tq=SELECT * WHERE A > 2

returns

"Index","A","B","C"
"3","234","345","567"
"4","bcd","cde","def"

this actually returns the data AFTER the n, subtract 1 if you need the nth row as well

2 Likes

Thank you everyone!

1 Like

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