Spent a bunch of time looking at this.. It seems that what little info there was about accessing a Google-apps spreadsheet is not very well maintained.. At Google IO this ye
I have implemented a fairly complete example and the code is at https://bitbucket.org/tbrander/ggadget/wiki/Home Code is BSD license (except for Trademarks and institutional markings which are all rights reserved) It is reasonably well commented... It is in operation at http://acre.cba.ua.edu/ (bottom of page) Stand alone at : http://acre.cba.ua.edu/mobiletool/res.html
It functions across IE, Chrome FF i-Phone and Android Your hints above are close but I was looking for yet more... as You can now see,, But I will explore the Jquery syntax as the current implementation is pure JS
Google provide a documented way to access google spreadsheet via JSONP that works for normal gmail.com accounts. In short:
To access this from within JavaScript you'll have to insert a HTML script tag into your document:
<script src="https://spreadsheets.google.com/feeds/cells/0AmHYWnFLY1F-dG1oTHQ5SS1uUzhvTnZTSHNzMjdDaVE/od6/public/values?alt=json-in-script&callback=myCallback"></script>
And you'll need to implement the callback function in your webpage:
function myCallback(spreadsheetdata) {
// do something with spreadsheet data here
console.log(spreadsheetdata);
}
You can simplify this with jQuery:
var url = "https://spreadsheets.google.com/feeds/cells/0AmHYWnFLY1F-dG1oTHQ5SS1uUzhvTnZTSHNzMjdDaVE/od6/public/values?alt=json-in-script&callback=?";
$.getJSON(url,{}, function (d) { console.log(d); });