问题
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:)
回答1:
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
来源:https://stackoverflow.com/questions/18153290/how-to-query-a-google-spreadhseet-via-spreadhseet-api-v3