title: Google Apps Script insert Sheets data to Doc throwing error
body: <p>Using the code in the Google Developer help center to insert a table into a document works fine.</p>
  <pre><code>
  // Create a two-dimensional array containing the cell contents.
  var cells = [
    ['Row 1, Cell 1', 'Row 1, Cell 2'],
    ['Row 2, Cell 1', 'Row 2, Cell 2']
  ];
  
  // Build a table from the array.
  body.appendTable(cells);
  </code></pre>
  <p>However, what I need to do is insert cells from a spreadsheet as a table to my document. I've tried following other posts from here and wrote this:</p>
  <pre><code>const body = DocumentApp.getActiveDocument().getBody();
  const sheet = SpreadsheetApp.openById(&quot;spreadsheetID&quot;).getSheetByName(&quot;Reports&quot;);
  var ssCells = sheet.getRange(&quot;A2:C5&quot;).getValues();
  body.appendTable(ssCells);
  </code></pre>
  <p>but it throws the error &quot;Exception: The parameters (number[]) don't match the method signature for DocumentApp.Body.appendTable.&quot; I've logged the <code>ssCells</code> variable and it returns a normal 2d array of values, which looks in format identical to the <code>cells</code> variable from the Google example.</p>
  <p>How do I get past this error and insert Sheets data as a table to Docs?</p>