title: Appending multiple rows to Spreadsheet - Google Apps Script
body: <p>I wish to append multiple rows to a google sheet via GAS whilst being considerate of performance and undesired possiblities.</p>
  
  <p>To achieve this for a single row, I would use <code>appendRow</code> as this tackles problems with intervening mutations and completes all actions in a single function.</p>
  
  <p>Simple Example:</p>
  
  <pre><code>var sheet= SpreadsheetApp.openById(ssId).getSheetByName(sheetName);
  sheet.appendRow(["foo", "bar", "foobar"]);
  </code></pre>
  
  <p>Of course to extend this to multiple rows, I could simply loop over this function for each row, though GAS best practices advises against such practices.</p>
  
  <p>Attempts to use <code>appendRow</code> to add multiple rows via a 2D array were unsuccessful and led to the API using references to the secondary arrays as the values going into the row.</p>
  
  <p>I therefore ask, is there a way to append multiple rows to a spreadsheet that still tackles the intervening mutuability that <code>appendRow</code> does and avoids looping where possible?</p>