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:
  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:



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

    Cheers Mate

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

    1. 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. 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?

  4. Your csv does work. Cool. However, I am in need of xml or rss. Were you able to publish out to those file types?

    1. I haven’t tested it, but you could try playing with the “format=csv” part of the URL to see if “xml” or “rss” works in place of “csv”. Let me know how you get on with it.

      1. Hi Adam,

        Many thanks for your solution, it works fine with

        but it doesn’t work with

        Any idea to export to this format?
        I can’t understand why this fomat has been abandoned.

        Many thanks

  5. Is it possible to export all sheets under one CSV? I have tried setting GID to 0 but that would only export the first sheet.

    Thank you

Comments are closed.