I'm trying to get this simple task done of deleting all rows in a
spreadsheet.
Unfortunately there is zero documentation, so I'm clueless.
Tried the followng code, which gives me a batchlink == null error.
// Fetch the list feed of the worksheet.
URL listFeedUrl = worksheet.getListFeedUrl();
ListFeed listFeed = service.getFeed(listFeedUrl, ListFeed.class);
List<ListEntry> rows = listFeed.getEntries();
ListFeed batchRequest = new ListFeed();
for (int i = 1; i < rows.size(); i++) {
ListEntry entry = rows.get(i);
ListEntry batchEntry = new ListEntry(entry);
BatchUtils.setBatchId(batchEntry, entry.getId());
BatchUtils.setBatchOperationType(batchEntry, BatchOperationType.DELETE);
batchRequest.getEntries().add(batchEntry);
}
Link batchLink = listFeed.getLink(Link.Rel.FEED_BATCH, Link.Type.ATOM);
* if (batchLink != null) {*
service.batch(new URL(href), batchRequest);
}
Question 2, is there some higher level API library?
--
You received this message because you are subscribed to the Google Groups
"Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.