Skip to content
  • There are no suggestions because the search field is empty.

Creating Google Sheets Direct Download Links to a CSV File

When you want to link to files in Google Sheets, by default, the link opens the spreadsheet in Google Sheets instead of downloading the data. Please note that the link provided in this example is not a real link. If you want a link that directly downloads the sheet as a CSV file, follow these steps:

1. Go to the file in Google Sheets.

2. The link will have a similar format to this: https://docs.google.com/spreadsheets/d/2p91UaHNzqUqyBWXqQRiu9-QXbLs6ggjw/edit. The long string of letters and numbers in the link is the spreadsheet key. Copy this and save it in a notepad or somewhere accessible.

3. In Spark, copy this link: https://docs.google.com/spreadsheets/d/{key}/gviz/tq?tqx=out:csv&sheet={sheet_name}.

4. Replace {key} with the string from above (for example, 2p91UaHNzqUqyBWXqQRiu9-QXbLs6ggjw).

5. Replace {sheet_name} with the name of the sheet (for example, Sheet1).

6. Your link will now look like this: https://docs.google.com/spreadsheets/d/2p91UaHNzqUqyBWXqQRiu9-QXbLs6ggjw/gviz/tq?tqx=out:csv&sheet=Sheet1.

7. Now, Spark will be able to pull the file from this location.

8. The link can be publicly accessible or private, available to anyone who has the link.

9. That's it! This link will now directly download a CSV file.

Use this link in an inventory update with the HTTP strategy and CSV as the File Type.