0

Sample Google Sheet:

NAME AGE COLOR
Robert 22 Red
John 21 Blue
Ann 20 Purple
John 21 Green

Call with URL: http://{URL to Google Sheet above}/parameters

What parameters should I use here to filter by NAME = John and get the result below?

Result: Google sheet is open, but filtered as follows:

NAME AGE COLOR
John 21 Blue
John 21 Green
0

1 Answer 1

1

There is no URL parameter to specify a key value such as John to filter by, but you can specify a filter view to open with the fvid parameter, and use the parameter to open a specific filter view that only shows rows with John in a certain column.

For additional ease of use, you can insert links in the frozen section of the sheet to easily switch between filter views, instead of having to go to Data > Filter views to switch. See the Filter views example spreadsheet for an illustration.

If you just want to get the raw data instead of opening an editable spreadsheet, you can use a query string like this:

https://docs.google.com/spreadsheets/d/1pgdF1hoid8m1Zj3KburwjZRGkydLh1Sum4DshUMaIeo/gviz/tq?tq=select B where A contains "bird"&sheet=Sheet2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.