Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Copy the format from A1:C1 and paste it into A2:C5, so the data in
- // each column has the same background.
- requests.add(new Request()
- .setCopyPaste(new CopyPasteRequest()
- .setSource(new GridRange()
- .setSheetId(0)
- .setStartRowIndex(0)
- .setEndRowIndex(1)
- .setStartColumnIndex(0)
- .setEndColumnIndex(3))
- .setDestination(new GridRange()
- .setSheetId(0)
- .setStartRowIndex(1)
- .setEndRowIndex(6)
- .setStartColumnIndex(0)
- .setEndColumnIndex(3))
- .setPasteType("PASTE_FORMAT")));
- BatchUpdateSpreadsheetRequest batchUpdateRequest = new BatchUpdateSpreadsheetRequest()
- .setRequests(requests);
Add Comment
Please, Sign In to add comment