title: Remove a row from an Array of values by row index
body: <p>I want to remove rows from an array by row Index</p>
  
  <p>I have</p>
  
  <pre><code>function test() {
  arr1 = [[Id, From, To], [1.0, AA1, BB1], [2.0, AA2, BB2], [3.0, AA3, BB3], [4.0, AA4, BB4], [5.0, AA5, BB5], [6.0, AA6, BB6]]
  
  arr1.splice(1,1);
  return arr1
  }
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>[[Id, From, To], [2.0, AA2, BB2], [3.0, AA3, BB3], [4.0, AA4, BB4], [5.0, AA5, BB5], [6.0, AA6, BB6]]
  </code></pre>
  
  <p>Whitch is what I want</p>
  
  <p>But If I have instead</p>
  
  <pre><code>function test() {
  var sht = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1");
  arr1 = [[Id, From, To], [1.0, AA1, BB1], [2.0, AA2, BB2], [3.0, AA3, BB3], [4.0, AA4, BB4], [5.0, AA5, BB5], [6.0, AA6, BB6]]
  
  var result = arr1.splice(1,1);
  
  sht.getRange(1,1,result.length,result[0].length).setValues(result)
  }
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>result = [[1.0, AA1, BB1]]
  </code></pre>
  
  <p>I do not get what is going on, how do I get</p>
  
  <pre><code>result = [[Id, From, To], [2.0, AA2, BB2], [3.0, AA3, BB3], [4.0, AA4, BB4], [5.0, AA5, BB5], [6.0, AA6, BB6]]
  </code></pre>