How to query a Google spreadhseet via spreadhseet api v3?

旧街凉风 提交于 2019-12-24 22:38:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!