New Google Spreadsheets publish limitation

后端 未结 10 788
忘了有多久
忘了有多久 2020-11-29 18:47

I am testing the new Google Spreadsheets as there is a new feature I really need: the 200 sheets limit has been lifted (more info here: https://support.google.com/drive/answ

相关标签:
10条回答
  • 2020-11-29 19:21

    The new Google spreadsheets use a different URL (just copy your <KEY>):

    • New sheet : https://docs.google.com/spreadsheets/d/<KEY>/pubhtml
    • CSV file : https://docs.google.com/spreadsheets/d/<KEY>/export?gid=<GUID>&format=csv

    The GUID of your spreadsheet relates to the tab number.

    /!\ You have to share your document using the Anyone with the link setting.

    0 讨论(0)
  • 2020-11-29 19:23

    The correct URL for downloading a Google spreadsheet as CSV is:

    https://docs.google.com/spreadsheets/export?id=<ID>&exportFormat=csv
    
    0 讨论(0)
  • 2020-11-29 19:25

    Here is another temporary, non-PHP workaround:

    1. Go to an existing NEW google sheet
    2. Go to "File -> New -> Spreadsheet"
    3. Under "File -> Publish to the web..." now has the option to publish a csv version

    I believe this is actually creating an old Google sheet but for my purposes (importing google sheet data from clients or myself into R for statistical analysis) it works until they hopefully update this feature.

    I posted this in a Google Groups forum also, please find it here:

    https://productforums.google.com/forum/#!topic/docs/An-nZtjaupU

    0 讨论(0)
  • 2020-11-29 19:26

    I was able to implement a query to the result, see this table

    https://docs.google.com/spreadsheets/d/1LhGp12rwqosRHl-_N_N8eTjTwfFsHHIBHUFMMyhLaaY/gviz/tq?tq=select+A,B,I,J,K+where+B%3E=4.5&pli=1
    

    the spreadsheet fetches data from earthquake, but I just want to select MAG 4.5+ earthquakes so it makes the query and the columns, just a problem:

    I cannot parse the result, I tried to decode as json but was not able to parse it. I would like to be able to show this as HTML or CSV or how to parse this ? for example to be able to plot it on a Google Map.

    0 讨论(0)
提交回复
热议问题