Reading from google sheet with tab 2


i, thanks to your help, I have a working script. It reads the list from sheet 1, and I'd like it to read (display) the tables from the next tab, sheet 2. I've tried various options, but it keeps loading from sheet 1 instead of sheet 2.

How do I read data from tab 2?

Did you add the sheet name at the end in the web url like &sheet=Sheet2???? Else as a default this web url will return sheet 1 data

I don't really know where to add it
https://docs.google.com/spreadsheets/d/1zgQT5wHhs5Iw8A-ZV3wWtR5mzb8s2RaaugLLNDYRAI/export?format=csv

just add &sheet=Sheet2 at the end

Make sure you have set the permission as viewer

image

it doesn't work, it keeps loading from A1 and not from A2

first post says you want to get from sheet 2

But in this reply you are saying , not getting from A2.

Actually, What is your expectation? you want to get data from sheet2 or from A2?

in the above picture i have shown you the main gsheet which contains multiple sheets and i have used above said request to get particular range from particular sheet data and whose csv also attached in the above image. Still what do you want?

You should use the gid for the required sheet



I have 1 main sheet and I need to extract data from the 2nd tab

thanks its working:D