RouteMapper
RouteMapper

Reputation: 2560

How to use Google sheets query or Google visualization api from apps script?

I am using a Google Script bound to a Google Sheet to programatically generate the following query:

=query('16 Jul - 20 Jul Responses'!A1:I31, "SELECT C WHERE D = 'Available'", 0)

Is there any way in Google Scripts to parse an object representation of that query's results? I'd like to be able to code something like:

var queryString = '=query('16 Jul - 20 Jul Responses'!A1:I31, "SELECT C WHERE D = 'Available'", 0)'; var results = new Query(queryString); for(var i = 0; i < results.length; i++) { var result = results[i]; // do something }

As far as I can tell, the Query object doesn't exist unless you are working with a Google Web App. Is this true? Or is there a way to implement this idea?

Upvotes: 2

Views: 3282

Answers (0)

Related Questions