简体   繁体   中英

get google spreadsheet in json gives 404 Not found

I tried all possible way on the inte.net to fetch my google spreadsheet as json

$.getJSON()

But I keep getting 404 Not found. On publish to web I get this url: https://docs.google.com/spreadsheets/d/1vho9BS2YdCz3aKuLyV9m15stYhBu4G97ngzRasQsG1Y/pubhtml .

To fetch json I tired all the combinations of url in this

url = "https://docs.google.com/spreadsheets/d/1vho9BS2YdCz3aKuLyV9m15stYhBu4G97ngzRasQsG1Y/od6/public/values?alt=json&callback=?";
$.getJSON(url, function(resp) {
    console.log(resp)
});

Not sure what else to do. Seems the od6/public/value format does not work fro me. Also in "publish to web", google seems to have removed the Cells and List option.

Solution: I decided to use https://github.com/chriszarate/sheetrock . Did an awesome job!

The url you are trying to reach is not returning the JSON. It returns HTML, so the JQ function does not know what to do with the data it receives.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM