我试图将查询传递给电子表格。我有一个价值说“约翰cena”。我如何在下面的行中传递它。而这样做在Google电子表格中查询列表时不接受ListQuery的空格
ListQuery query = new ListQuery(listFeedUrl);
query.setSpreadsheetQuery("name = 'John cena' and age > 25");
ListFeed feed = service.query(query, ListFeed.class);
这我得到一个错误的错误即时得到:
com.google.gdata.util.InvalidEntryException: Bad Request
Parse error: Invalid token encountered
at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:594)
at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:563)
at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:552)
at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:530)
at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:535)
at com.google.gdata.client.Service.getFeed(Service.java:1135)
at com.google.gdata.client.Service.getFeed(Service.java:1077)
at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:662)
at com.google.gdata.client.Service.query(Service.java:1237)
at com.google.gdata.client.Service.query(Service.java:1178)
我试过了。它力求工作。我尝试过不同的可能性,比如单引号给它,提供下划线等。我有与列名相似的问题。但是,如果我在所有没有空格的小写字母中提供它,它确实有效。说全名。我已经把它作为全名。它适用于列名。 – user1238849 2012-02-29 23:15:30