Possible to scrape this data using gviz?

i did not know it

Then please do not make such suggestions.

ok i wont...

this worked but is there any way to get json out of this and not csv ?

a thanks would be nice :wink:

Google Sheets does not output to json. A public sheet can output to csv,tsv,html,pdf,xlsx and ods. Not sure how having json would help you, the output returns a 2 dimensional range of data - columns and rows - what key : value pairs are you hoping for ? (which you could build from the returned data)

1 Like

thanks @TIMAI2 for your help :smiley:

That's not true for gviz queries. If you set the format to JSON it will work but it will be wrapped in a JS function call which you'll need to strip off, but once you do that it is valid JSON. The JSON format actually contains more detailed information (headers/errors/etc) but the format is a little weird. (It's not a normal 2D array.)

I should have stuck to published google sheets above :slight_smile:
The OP does not have access to the actual google sheet in order to run gviz queries.

I did cover the json output in my guide which provides example output (ugh!)

1 Like

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