New Google Sheets: publishing a single worksheet to the web as CSV

With the switch to the new version of Google Sheets, the option to publish a specific worksheet and then access that as a CSV file has disappeared (hopefully just temporarily).

In the new Google Sheets, I managed to publish a worksheet as a CSV by piecing together answers from here and here.

This is how to do it:

  1. Share the Google Doc so anyone with the link can view (sadly this loses the granularity of only sharing specific sheets that used to exist in the old version).
  2. Publish the document (File > Publish to the Web) and look for the document ID in the URL
  3. Add that document ID into this URL in place of KEY:
    • https://docs.google.com/spreadsheets/d/<KEY>/export?format=csv&id=<KEY>
  4. While editing your Google Doc, open the worksheet you want to export and look in the URL for the GID parameter
  5. Copy this GID parameter and append it to your URL:
    • https://docs.google.com/spreadsheets/d/<KEY>/export?format=csv&id=<KEY>&gid=<GID>

Done

4 responses to New Google Sheets: publishing a single worksheet to the web as CSV

  1. Mithilesh says:

    Thanks for the solution. I was looking for a workaround for quite some time now.

    Cheers Mate

  2. Rodney says:

    Nice. However, you do not need the GID, just repeat the for both key and &id=

    • Adam says:

      The GID will target a particular worksheet in the spreadsheet (rather than just the first one), so it’s useful if you have a number of worksheets.

  3. Aaron says:

    I was so happy to find this, I am trying to put a Google Sheet onto a Weebly custom page without the header.

    Do I just need to insert the URL with the KEY and GID inserted, into ” x ” below?

Leave a Reply

Your email address will not be published. Required fields are marked *