404 ERROR when I try to GET data from google spreadsheet

Vitiello Andrea

Hy everyone, I don't know if exit someone who can help me.

I don't know how it is possible, few days ago all ok now it stop to work. Basically I read data in a html table on a website from a google spreadsheet public on website and public to everyone with the link. Using ajax.

Until now it worked, i saw all the datas and voices presents on my sheet in google drive, now it stop to show the datas and return an anonymous error like if the link to my google spreadsheet is inexistent, but it is here!!

For example on this googlesheet: https://docs.google.com/spreadsheets/d/13KmAf2uc13fWxPvn8dtk9j9kOL3nCVqi8H-wYau6Tww/edit?usp=sharing

I Have a series of data to display on my html website. Until few days ago it worked, now no.

I used jquery google : src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js">

I public my code below:

$.getJSON("https://spreadsheets.google.com/feeds/list/13KmAf2uc13fWxPvn8dtk9j9kOL3nCVqi8H-wYau6Tww/od6/public/values?alt=json", function (data) {
  var sheetData = data.feed.entry;
  var i;
  for (i = 0; i < sheetData.length; i++) {
    var nome = data.feed.entry[i]['gsx$_cn6ca']['$t'];
    var ingredienti = data.feed.entry[i]['gsx$_cokwr']['$t'];
    var prezzo = data.feed.entry[i]['gsx$_cpzh4']['$t'];
    document.getElementById('Vinorosato').innerHTML += ('<div class="Teglie menu-restaurant">'+'<span class="clearfix">'+'<a class="menu-title" style="padding-right: 50px;">'+nome+'</a>'+'<span class="menu-price">'+prezzo+'</span>'+'</span>'+'<span class="menu-subtitle" style="padding-right: 100px;">'+ingredienti+'</span>'+'</div>');

enter image description here

Mike Steelson

Try this code that doesn't require jQuery


function reqListener () {
  var jsonString = this.responseText.match(/(?<="table":).*(?=}\);)/g)[0];
  var json = JSON.parse(jsonString);
  var table = '<table>'
  for (var i=0;i<json.rows.length;i++){
    var nome = json.rows[i].c[0].v;
    var ingredienti = json.rows[i].c[1].v;
    var prezzo = json.rows[i].c[2].v;
    table += '<tr><td>' + nome + '</td><td>' + ingredienti + '</td><td>' + prezzo + '&nbsp;&euro;</td></tr>'
  table += '</table>'
  document.getElementById("Vinorosato").innerHTML = table;

var id = '13KmAf2uc13fWxPvn8dtk9j9kOL3nCVqi8H-wYau6Tww';
var gid = '0';
var url = 'https://docs.google.com/spreadsheets/d/'+id+'/gviz/tq?tqx=out:json&tq&gid='+gid;
var oReq = new XMLHttpRequest();
oReq.onload = reqListener;
oReq.open("get", url, true);
<div id="Vinorosato">&nbsp;</div></body></html>

and adapt with your own style

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at


Login to comment


I get an error when I try to show the comments for each post

404 Error when trying to get the photos from Google Map API

Why do I get a 404 error when calling this webservice?

Why I get error when I try to install pyaudio?

How to get the web pages from cache and restore data in the forms when i try to reach them from other pages of my site?

I try to get a football game schedule from Google and this error occurs

Lua: I get error when I try to run a script in Windows

I get a syntax error when I try to send a discord message

Is there a way to get rid of the syntax error when I run try and except?

Why do I get an Error when I try to rename a table after FROM?

I want to get pdf with image from google spreadsheet database from google document for the template

Why am i receiving error 404 when fetching video data?

Why I get an error when I try to upload a picture

ID get NULL when i try to update data

Read from Google spreadsheet and get html formatting

When I try to define settings, I get a different error

Android:App crashes when i try to retrieve data from intent

Getting an error when I try to parse data to get values from JSON

Why I get error when try build image in docker?

KOTLIN/FIREBASE Error when I try get data from firebase database - Client is offline

I try to get data from firebase and give me this error _CastError (Null check operator used on a null value)

Vue Website give 404 error when i try to access with website.com/pagename

When i try to get data from data for edit page it's showing me error

UnicodeDecodeError when try to read data from 'google.com' in Python

Flutter: Error: Instance of Object when I try to update user data

App crashes when I try to read data from Cloud Firestore

I try getting data from eBay from sold and auction items using webscraping but for some reason i get a NoneType error

Project freezes when I try to get data from api

I get data from Api but when I try to set the value with useState it give me an empty object

TOP Ranking