hi,

You can insert a header into a blank sheet by using a batchquery just like 
the batchupdater demo on main Spreadsheets API page...

Batch query will return all cells, even empty ones and then you can update 
via batch update as in teh demo  or (less gracefully) you can manually 
update each cell as you loop (providing your loop is small!). To get the 
batch update working I had to use the workaround mentioned in comment 22 
here: http://code.google.com/p/gdata-java-client/issues/detail?id=103

 CellFeed cellFeed = ssSvc.getFeed(cellFeedUrl, CellFeed.class);
            CellFeed queryBatchResponse =
              ssSvc.batch(new URL(cellFeed.getLink(Link.Rel.FEED_BATCH, 
Link.Type.ATOM).getHref()),
                          batchRequest);

            Map cellEntryMap = new HashMap(cellAddrs.size());
            for (CellEntry entry : queryBatchResponse.getEntries()) {
              cellEntryMap.put(BatchUtils.getBatchId(entry), entry);
              System.out.printf("batch %s {CellEntry: id=%s editLink=%s 
inputValue=%s\n",
                  BatchUtils.getBatchId(entry), entry.getId(), 
entry.getEditLink().getHref(),
                  entry.getCell().getInputValue());
            *  entry.changeInputValueLocal("Huzzah");
              entry.update();*
            }

            return cellEntryMap;
          }


or via batch


  Link batchLink = feed.getLink(Link.Rel.FEED_BATCH, Link.Type.ATOM);
            spreadSheetService.setHeader("If-Match", "*");
                CellFeed batchResponse = spreadSheetService.batch(new 
URL(batchLink.getHref()), batchRequest);
                spreadSheetService.setHeader("If-Match", null);


Reply via email to