-1

Hi I am using wget to extract google spreadsheet as csv

I used the following command

wget "https://docs.google.com/spreadsheets/d/LONG_ID_HERE/export?=csv"

but I am getting the HTML output

I have already used the google sheets api to extract data row by row and convert to csv but its very slow need a faster method

Any help will be appreciated

Thanks in advance

Eshank Jain
  • 169
  • 3
  • 14
  • you have to use google sheets api if you want to get the csv output of google spreadsheet – Arpit Solanki Feb 07 '18 at 07:54
  • I have already used the google sheets api to extract data row by row and convert to csv but its very slow need a faster method – Eshank Jain Feb 07 '18 at 08:11
  • one api call to google spreadsheet api will given you all the rows so after getting the response just convert it to csv – Arpit Solanki Feb 07 '18 at 08:14
  • 2
    Possible duplicate of [Download link for Google Spreadsheets CSV export - with Multiple Sheets](https://stackoverflow.com/questions/33713084/download-link-for-google-spreadsheets-csv-export-with-multiple-sheets) – bereal Feb 07 '18 at 08:22

1 Answers1

3

Please refer to the following post

Download link for Google Spreadsheets CSV export - with Multiple Sheets

To download a specific sheet as a CSV file, replace {key} with the document's ID and {sheet_name} with the name of the sheet to export:

https://docs.google.com/spreadsheets/d/{key}/gviz/tq?tqx=out:csv&sheet={sheet_name}

Note: Copied from the above post. Thanks @kiwidrew (https://stackoverflow.com/users/1390231/kiwidrew)

Murphy
  • 3,827
  • 4
  • 21
  • 35
Befen
  • 51
  • 4