Today I took my first stab at creating a Google Gadget that pulls data
from a Google Docs spreadsheet.

After flailing about for quite some time, I finally got something to
work based on some sample code from 
http://code.google.com/apis/spreadsheets/spreadsheet_gadgets.html

Putting my new knowledge to the test, I thought I should be able to
set my query inside the code instead of pulling the entire spreadsheet
based on the URL that I'd been setting in the gadget properties.  As
shown in the code scrap below, I commented out the line of code that
gets the URL from the UserPrefs.  Then in accordance with:

http://code.google.com/apis/visualization/documentation/querylanguage.html#Setting_the_Query_from_JavaScript

I used the next two lines to define the source table and the query.

//  var query = gadgetHelper.createQueryFromPrefs(prefs);
  var query = new google.visualization.Query("http://
spreadsheets.google.com/a/azbikeclub.org/ccc?
key=pcgG03qqMcz39cWkgDGUzPg&hl=en");
  query.setQuery('select MemberName order by MemberName');
  query.send(handleQueryResponse);

When the gadget runs, it says:

Invalid query
Column [MemberName] does not exist in table

There is indeed a column named "MemberName" in the spreadsheet.  How
come I can't select and sort on that column?  Thanks.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to