title: Changing Background Color of Row using Google Sheets API v4
body: <p>I'm trying to change the background color of the first row (header) in my Google spreadsheet. Based on several hours of research and reading I came up with the following code:</p>
  
  <pre><code>Request updateBackgroundColorRequest = new Request();
  UpdateCellsRequest updateCellsRequest = new UpdateCellsRequest();
  
  CellFormat cellFormat = new CellFormat();
  Color color = new Color();
  color.setRed((float) 246);
  color.setGreen((float) 178);
  color.setBlue((float) 107);
  
  cellFormat.setBackgroundColor(color);
  
  GridRange gridRange = new GridRange();
  gridRange.setStartRowIndex(0);
  gridRange.setEndRowIndex(1);
  gridRange.setStartColumnIndex(0);
  gridRange.setEndColumnIndex(14);
  updateCellsRequest.setRange(gridRange);
  
  String field = "userEnteredFormat.backgroundColor";
  updateCellsRequest.setFields(field);
  updateBackgroundColorRequest.setUpdateCells(updateCellsRequest);
  
  requestList.add(updateBackgroundColorRequest);
  batchUpdateSpreadsheetRequest.setRequests(requestList);
  
  Spreadsheets.BatchUpdate batchUpdate = service.spreadsheets()
      .batchUpdate(spreadsheetId, batchUpdateSpreadsheetRequest);
  batchUpdate.execute();
  </code></pre>
  
  <p>However, although I am able to execute this code successfully (no errors are returned by API) the background color does not change at all (I'm expecting it to change to orange but it remains white).</p>
  
  <p>Did I miss something?</p>