1
votes

With the change to the new Spreadsheet URL format, getting a CSV feed for a Google Spreadsheet feels like a moving target. I have a CSV feed working with this URL format:

https://docs.google.com/spreadsheets/d/<key>/export?id=<gid>&format=csv

However, it seems that Google is always returning the first sheet for this doc. Anyone know of changes to the URL scheme or something I am missing to obtain the CSV feed for the specified GID?

Thanks

1
This is working as intended, for spreadsheets the export to csv will only return the information in the first sheet. Here you can find the documentation developers.google.com/drive/web/…Gerardo
@Gerardo I am not using the official API and making requests to a public sheet. Previously, this had worked fine. I don't see any comments about public sheets in the link (unless I missed something)gregory
What API are you using?Gerardo
@Gerardo No API. Just trying to get a CSV feed of a spreadsheetgregory

1 Answers

4
votes

You are 99% there - the actual URL is:

https://docs.google.com/spreadsheets/d/<key>/export?gid=<gid>&format=csv

In other words, you put "?id=" instead of "?gid=". With the proper URL, then you can download any sheet in the doc, not just the first.