title: getRange and setValue not working - Google Scripts
body: <p>I'm trying to create headers in a sheet on a given row. I was able to do that by using individual insertions from the code below, but I know that's not the best method:</p>
  
  <pre><code>  sheet.getRange('A1').setValue("Date");
    sheet.getRange('B1').setValue("Impressions");
    sheet.getRange('C1').setValue("Clicks");
    sheet.getRange('D1').setValue("CTR%");
    sheet.getRange('E1').setValue("Cost");
    sheet.getRange('F1').setValue("Average CPC");
    sheet.getRange('G1').setValue("Conversions");
    sheet.getRange('H1').setValue("Conversion Rate");
    sheet.getRange('I1').setValue("Cost Per Conversion");
  </code></pre>
  
  <p>I then tried to create an array to insert all at once, like below, but it didn't work: </p>
  
  <pre><code>  var colHeaders = [
    ["Date", "Impressions", "Clicks", "CTR%", "Cost", "Average CPC", "Conversions", "Conversion Rate", "Cost Per Conversion"]
    ];
  
      sheet.getRange("A1:I1").setValue(colHeaders);
     // var sheet already defined earlier and working fine
  </code></pre>
  
  <p>I've tried this based on <a href="https://developers.google.com/apps-script/reference/spreadsheet/range#setValue(Object)" rel="nofollow noreferrer">this Google docs</a> that provided this example:</p>
  
  <pre><code>var values = [
     [ "2.000", "1,000,000", "$2.99" ]
   ];
  
   var range = sheet.getRange("B2:D2");
   range.setValues(values);
  </code></pre>
  
  <p>What Am I doing wrong?</p>