Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

querying google spreadsheet rows

Im using the c# google spreadsheets api to work with our spreadsheets.

Im having a problem querying the sheets we have.

Namely Im having a problem trying to get specific rows based on their title,which is the value in the first cell of the row, we are currently not using headers in our spreadheets as we need a vertical layout rather a horizontal one.

listQuery.SpreadsheetQuery = "Select A";

from reading the api docs that should be all i need to do there but it throws an error,which is a bad request with null response message..

AtomLink ListFeedLink = worksheet.Links.FindService(GDataSpreadsheetsNameTable.ListRel,         null);

ListQuery listQuery = new ListQuery(ListFeedLink.HRef.ToString());
if (!string.IsNullOrEmpty(spreadsheetQuery))
{
   listQuery.SpreadsheetQuery = "age=25";
}

ListFeed listFeed = myService.Query(listQuery);

Im using the above code

anyone have any tips for querying spreadsheets in this way?

like image 793
user2060835 Avatar asked Aug 13 '26 13:08

user2060835


1 Answers

You say: "we are currently not using headers in our spreadsheets". When I tested ListFeed, it needed headers, this was not an optional extra. CellFeed does not require headers and has a search style query, see https://code.google.com/p/gdata-java-client/source/browse/trunk/java/sample/spreadsheet/cell/CellDemo.java

like image 85
eddyparkinson Avatar answered Aug 15 '26 04:08

eddyparkinson