1

I'm using the Java APIs to update a Google Spreadsheet from a CSV file. I've created a method for deleting a row:

public void deleteRow(int row) throws IOException, ServiceException {
    URL listFeedUrl = _worksheet.getListFeedUrl();
    ListFeed feed = _service.getFeed(listFeedUrl, ListFeed.class);
    List<ListEntry> entries = feed.getEntries();
    ListEntry entry = entries.get(row);
    entry.delete();
}

however, the problem is that I have to get all the entries to get the one entry I want. Is there a way that I can get one or even a smaller subset of the entries so I don't have to wait for the entire entry set to return to only delete one entry? (In its current state, this method takes a long time to run on large spreadsheets)

Joel
  • 16,474
  • 17
  • 72
  • 93
  • I ran into this need as well, but am using the protocol method. While I don't have an answer for Java, see my answer here. Maybe it will help? http://stackoverflow.com/questions/27678331/retreive-a-range-of-rows-from-google-spreadsheet-using-list-based-feed-api-and – ariestav Jan 09 '15 at 14:58

1 Answers1