Export Documents from the New Google Sheets by URL | Austin Butler

Export Documents from the New Google Sheets by URL

The URL for exporting to a document has changed

Sunday, March 23, 2014

Google announced on March 20th that they will be automatically upgrading everyone to the new Google Sheets "over the next few weeks."

Initially I avoided upgrading to the new Sheets due to the lack of notifications, but they have since added notifications back. Given the addition of notifications and the inevitability of the new Sheets upgrade, I gave it a shot. I do like the new features, add-ons, and speed, but I rely on being able to export in TSV format for a script I used to convert Google Sheets to DokuWiki table format. The URL for exporting to a document has changed with the new Google Sheets. At first I couldn't figure out any way to make it export, but I found a StackOverflow post that discussed the issue, albeit in a more developer-oriented way. it didn't give me exactly what I needed, but it lead me down the right path.

URL Format

Just replace SHEET_ID with the ID from the edit URL or share menu, SHEET_GID with the GID of the sheet (also found in the edit URL), and EXTENSION with the desired export format (the available options are given below).

https://docs.google.com/spreadsheets/d/SHEET_ID/export?gid=SHEET_GID&format=EXTENSION

Available Export Formats

These are the formats currently available, to my knowledge. If you know of more, let me know.

Format Extension
Comma-Separated Values csv
Excel xlsx
Portable Document Format pdf
Tab-Separated Values tsv