title: How do I format a header row in Google Sheets API v4 in C#?
body: <p>I want the following output:</p>
  
  <p><a href="https://i.stack.imgur.com/eiKg8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eiKg8.png" alt=""></a></p>
  
  <p>But I receive the following result:</p>
  
  <p><a href="https://i.stack.imgur.com/55FU3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/55FU3.png" alt=""></a></p>
  
  <p>I followed the instructions on this SO question:</p>
  
  <p><a href="https://stackoverflow.com/questions/38348237/how-to-change-color-of-range-in-google-sheets-api-v4-in-net">How to Change color of range in google sheets api v4 in .net</a></p>
  
  <p>But this code is bold on all rows and columns of the sheet.</p>
  
  <p>How can I solve this problem?
  My Code is:</p>
  
  <pre><code>var userEnteredFormat = new CellFormat()
  {
      TextFormat = new TextFormat()
      {
          Bold = true,
          FontSize = 12
      }
  };
  
  BatchUpdateSpreadsheetRequest batchupdateCell = new BatchUpdateSpreadsheetRequest();
  
  //create the update request for cells from the first row
  var updateCellsRequest = new Request()
  {
      RepeatCell = new RepeatCellRequest()
      {
          Range = new GridRange()
          {
              SheetId = sheetId,
              StartColumnIndex = 0,
              StartRowIndex = 0,
              EndColumnIndex = 28,
              EndRowIndex = 1
          },
          Cell = new CellData()
          {
              UserEnteredFormat = userEnteredFormat
          },
          Fields = "UserEnteredFormat(TextFormat)"
      }
  };
  
  batchupdateCell.Requests = new List&lt;Request&gt;();
  batchupdateCell.Requests.Add(updateCellsRequest);
  SpreadsheetsResource.BatchUpdateRequest bur = service.Spreadsheets.BatchUpdate(batchupdateCell, SheetId);
  BatchUpdateSpreadsheetResponse responseUpdate3 = bur.Execute();
  </code></pre>