title: How to avoid empty row when data automatically inserted to another sheet
body: <p><strong>The Code</strong></p>
  <p>I have a script in Google Sheets that takes data from a sheet called OUT and transfers it to a sheet called EXPORT plus it then increases the value of IN!B2 by 1.</p>
  <pre><code>function Transfer() {
  var app = SpreadsheetApp;
  var sss = app.getActiveSpreadsheet();
  
  var out_sheet = sss.getSheetByName('OUT');
  var out_sheet_lastrow = out_sheet.getLastRow();
  var range_to_copy = out_sheet.getRange(2,1,out_sheet_lastrow,15).getValues();
  
  var export_sheet = sss.getSheetByName('EXPORT');
  var export_sheet_lastrow = export_sheet.getLastRow();
  
  var cell = sss.getSheetByName('IN').getRange('B2');
  var value = cell.getValue() * 1;
  cell.setValue(value+1);
  
    { 
      export_sheet.getRange(export_sheet_lastrow+1,1,out_sheet_lastrow,15).setValues(range_to_copy);
    }
  };
  </code></pre>
  <p><strong>The problem</strong></p>
  <p>Since the range of rows in EXPORT will vary each time, I need to make sure there are no empty rows or otherwise importing to BigQuery gives me an error because of the imported blank row.</p>
  <p>For example, this is the Sheet EXPORT before the data is transferred from OUT:</p>
  <p>Sheet EXPORT before transfer of data:
  <img src="https://i.stack.imgur.com/3fG1r.png" alt="" /></p>
  <p>While this is the Sheet EXPORT after the transfer:</p>
  <p>Sheet EXPORT after transfer of data:
  <img src="https://i.stack.imgur.com/qSL6g.png" alt="" /></p>
  <p><strong>The Needed Solution:</strong></p>
  <p>Ideally I would like to modify the code to avoid the addition of this extra row.
  If this is not possible because it is added by default, then help in what would be  the best solution to delete it each time the data is moved fro OUT to EXPORT so that when BigQuery tries to fetch the data there is no blank row at the end of the sheet.</p>