0

I am trying to update/add data to a google spreadsheet which will act as a database. Here is my spreadsheet and my JSfiddle. In the fiddle I can GET information; however, I am not sure how to POST new information yet. It doesn't see as easy as setting data.feed.entry[4]['gsx$content']["$t"]; to the value I want. How would I do this?

Thanks.

benjipelletier
  • 653
  • 5
  • 11
  • 29

1 Answers1

1

the problem is that you have no 'Access-Control-Allow-Origin'

You need to make a jsonp request so just modify your url adding &callback=? and jQuery does the rest

var url = "http://spreadsheets.google.com/feeds/list/1qPcO2SDbnyHcmxtbTb8DmG_f2_grEGIW1MaThSoFzFc/od6/public/values?alt=json&callback=?";

This is the fiddle

Regards!

  • Hi, thanks for responding; however, I am not exactly sure how this will help when trying to change the data on the google spreadsheet. I have tried making `data.feed.entry[4]['gsx$content']["$t"] = "new value"` but I don't believe that is correct. I hope that is clear now. Thanks – benjipelletier Oct 25 '14 at 13:30
  • Hello, sorry about that. I think this link from another thread could be helpful for you [link](http://stackoverflow.com/questions/19887737/pushing-data-to-google-spreadsheet-through-javascript-running-in-browser). Regards! – Javi García Oct 27 '14 at 08:50
  • This couldn't be more helpful. Thanks a ton! – benjipelletier Oct 27 '14 at 10:35