Posted on 03-26-2019 09:45 AM
Does anyone have any insight on how to download a Google Sheet to a tsv/csv if the GID is something other than 0?
I have lots of scripts that download tsv's from Google Sheets. However, they all do it from the first sheet (gid 0). I now have some workbooks that have multiple sheets and I cannot seem to get the export to work when specifying a gid. I am using curl on linux and macos. Here's the command lines I'm trying. Both only get the data from gid 0, even when I specify a different gid.
curl -L https://docs.google.com/spreadsheets/d/1EmKWnUVibRPeLPcnwXl89J4BQaqJthXEPVsgR3x1LBU/export?format=tsv&gid=506767075
curl -L https://docs.google.com/spreadsheets/d/1EmKWnUVibRPeLPcnwXl89J4BQaqJthXEPVsgR3x1LBU/export?format=tsv&gid=506767075&id=1EmKWnUVibRPeLPcnwXl89J4BQaqJthXEPVsgR3x1LBU