zg303
zg303

Reputation: 97

How to query a Google spreadhseet via spreadhseet api v3?

I have a very large spreadsheet filed with music metadata. I have wrote a program to pull an individual album, via the spreadsheet api from Google, based on the albums UPC code. It does this though a loop, pulling one cell at a time and comparing. It is very slow, it takes 6 seconds for a 12 track album. In attempt to make this program faster, I found an argument called "structured query" in a Google article, but I cannot get it to work. Here are the queries I have tried.

Structured query:https://developers.google.com/google-apps/spreadsheets/#sending_a_structured_query_for_rows

Where I actually name the column:

    GET https://spreadsheets.google.com/feeds/list/key/worksheetId/private/full?sq=upc%3D890151002233

Where I use the assigned column name (c):

    GET https://spreadsheets.google.com/feeds/list/key/worksheetId/private/full?sq=c%3D890151002233

Both return 0 results even though the UPC code exists (I copied it straight from the first line of the spreadsheet). Am I doing something wrong or is the operation I am trying to complete not possible?

Any help would be appreciated:)

Upvotes: 0

Views: 1565

Answers (1)

eddyparkinson
eddyparkinson

Reputation: 3700

Performs a full database-like query on the rows.

Example of how to use the query is here: https://gdata-java-client.googlecode.com/svn-history/r51/trunk/java/sample/spreadsheet/list/ListDemo.java

Upvotes: 1

Related Questions