title: Google Spreadsheet script error : "Cannot convert (class) ... to Object[][]"
body: <p>I have a on dimensional array of 13 dates that I'd like to put in a spreadsheet row.  </p>
  
  <p>When I debug this code:</p>
  
  <pre><code>if (arrDates.length &gt; 0) {
      var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
      var destSheet = spreadsheet.getSheetByName("Employee Capacity Detail");
      destSheet.getRange("C2").offset(0,0,arrDates.length).setValues(arrDates);
  }
  </code></pre>
  
  <p>I get this error message: "Cannot convert (class)@7c02952c to Object[][]." on this line:</p>
  
  <pre><code>destSheet.getRange("C2").offset(0,0,arrDates.length).setValues(arrDates);
  </code></pre>
  
  <p>I've also tried this:</p>
  
  <pre><code>destSheet.getRange(1, 3, 1, 14).setValues(arrDates);
  </code></pre>
  
  <p>and this:</p>
  
  <pre><code>var destRange = destSheet.getRange("C2:P2");
  destRange.setValues(arrDates);
  </code></pre>
  
  <p>And get the same error.</p>
  
  <p>In the debugger I can see that arrDates is populated with 14 dates as expected.</p>
  
  <p>A google search for this error message has not turned up anything.  Does anyone have any ideas for why I am getting this error, or what I might do to troubleshoot further?</p>