views:

488

answers:

0

Is there a good way to get the first empty cell in a column from Google's spreadsheet service via Java?

I know I can use:

public CellFeed CheckColumn(int row, int col) 
    throws IOException, ServiceException {
    CellQuery query = new CellQuery(cellFeedUrl);
    query.setMinimumRow(row);
    query.setMaximumRow(row);
    query.setMinimumCol(col);
    query.setMaximumCol(col);
    query.setReturnEmpty(true);

    CellFeed feed = service.query(query, CellFeed.class);
    int cell_loc[];

    for (CellEntry entry : feed.getEntries()) {
       cell_loc=CheckIfEmpty(entry);   
    }
    return cell_loc;
}

And walk through the entries, but I'd rather not load the entire column at once, it's slow for my users and it seems bad to just walkthrough the entire column

Any thoughts?