Hi,

I'm trying to write a Google spreadsheet macro to process a large stack of 
data (e.g. to create a list of unique values from a wide range so I can 
generate some column headings on another sheet).  I've previously used the 
Google query language API within Sites via data source 
URLs<http://code.google.com/apis/chart/interactive/docs/querylanguage.html#Setting_the_Query_in_the_Data_Source_URL>,
 
so I thought I should be able to use a query within a JavaScript inside the 
source spreadsheet's script editor.

However, when I run the script, I receive the error:-

ReferenceError: "google" is not defined

at the line

var query = new google.visualisation.Query(--*URL--*).


This is the page I was using as guidance -> 
http://code.google.com/apis/ajax/playground/?type=visualization#using_the_query_language.
 
 It seems to imply that it should just work.

I feel I've fallen at the first hurdle!   Is this API not compatible with 
spreadsheet scripts or is there something fundamental I've missed?  Do I 
somehow need to declare the library within the script editor?  I'm quite 
new to Google Apps and JavaScript but have long experience with VBA.  I've 
got a basic spreadsheet JavaScript working (just counting columns).  I've 
tried publishing the sheet but that didn't solve the error.

We're Google Apps users, so the source spreadsheet is within our corporate 
domain inside Google, if that makes any difference.

Thanks for any help,

J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/sDucOMa3rEoJ.
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