Frage

First endpoint

I am reading Google query language specification. This endpoint allows me to query data but I have not figured out how to select page, how can I select page? I tried:

$.ajax({
  dataType: 'jsonp',
  url: 'http://spreadsheets.google.com/a/google.com/tq?key=ABCDE&tq=select%mypage!A'
})

Note the mypage!. But this does not work.

Also, when trying without mypage!, I receive an answer like this:

// Data table response
google.visualization.Query.setResponse({"version":"0.6...

Where should I read about this response? do I need to load some Google Library? why, if I just want the data? is there a better approach to get just data?

Second endpoint

I also read this example. This allows to select worksheet with a code od6, od7 and so on, why it starts in od6?, is just my document? where I can find documentation about this.

For both endpoints I am using JSONP.

War es hilfreich?

Lösung

Use gid= e.g :

https://spreadsheets.google.com/tq?key=0Ao_WaOWBqWmjdGRZV3dxdW1sdXhaeUs0cko5ZEVldEE&gid=0&tq=select%20A

I read that #gid and od6 are not connected, and the only way to get the od6 that links to the #gid, is to loop through all the #gid values to find the matching sheet.

I suspect there is no way to add "gid" into the query string, as there is no way to merge data from more than one source with the query, or none that I have seen.

Andere Tipps

To use a gid did not work for me, I used:

http://spreadsheets.google.com/feeds/worksheets/MY_KEY/public/basic?alt=json-in-script

To get a list of worksheets and then with the response, I searched in it the title of my spreadsheet and get the id which is od6, od4, etc.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top