Guest User

Untitled

a guest
Aug 25th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. // Copy the format from A1:C1 and paste it into A2:C5, so the data in
  2. // each column has the same background.
  3. requests.add(new Request()
  4. .setCopyPaste(new CopyPasteRequest()
  5. .setSource(new GridRange()
  6. .setSheetId(0)
  7. .setStartRowIndex(0)
  8. .setEndRowIndex(1)
  9. .setStartColumnIndex(0)
  10. .setEndColumnIndex(3))
  11. .setDestination(new GridRange()
  12. .setSheetId(0)
  13. .setStartRowIndex(1)
  14. .setEndRowIndex(6)
  15. .setStartColumnIndex(0)
  16. .setEndColumnIndex(3))
  17. .setPasteType("PASTE_FORMAT")));
  18.  
  19. BatchUpdateSpreadsheetRequest batchUpdateRequest = new BatchUpdateSpreadsheetRequest()
  20. .setRequests(requests);
Add Comment
Please, Sign In to add comment