Reputation: 5021
I am planning to use Google spreadsheet API to fetch data from a spreadsheet and render it in my mobile app using Sencha Touch. I have seen few blogs and tutorial which explain how to fetch and parse data but when I am trying the same I am not getting column wise data as attributes in entry
object instead I am getting comma separated data in content
tag.
To give you an example, here is sample spreadsheet in which I have change headers and data:
https://docs.google.com/spreadsheet/ccc?key=0AkEOCoTxRKgvdDRZUnViSFlOVUF0QUJybkZ6VlBwTkE#gid=0
and here is its feed:
but when I created same spreadsheet by hand from scratch I am not getting gsx$name
& gsx$processedlinkurl
attribute in JSON. Here is that sheet:
https://docs.google.com/spreadsheet/ccc?key=0AgduEz3vmQUTdHZlSEI4bjN6VnZ5TVpRMFlyOVAtR0E#gid=0
Here is the JSON:
To mark first row as header I have frozen first row in my sheet still JSON is not giving me header wise data in JSON.
Upvotes: 2
Views: 2483
Reputation: 5021
OK I got the mistake, it is values instead of basic which is to be used in URL while accessing spreadsheet API to get all headers in result which means
Correct URL:
https://spreadsheets.google.com/feeds/list/0AgduEz3vmQUTdHZlSEI4bjN6VnZ5TVpRMFlyOVAtR0E/od6/public/values?alt=json
Wrong URL:
https://spreadsheets.google.com/feeds/list/0AgduEz3vmQUTdHZlSEI4bjN6VnZ5TVpRMFlyOVAtR0E/od6/public/basic?alt=json
Upvotes: 4