title: How to Ignore Empty Rows in getRange()getValues() with A1 notation
body: <p>Teaching myself how to code in Google Apps Script and I can't figure out how to ignore blank rows in the array, based on getRange A1 notation.</p>
  
  <p>This other post works if my range is only one column, but I'm trying to do it if a whole row is blank, not just the value in one column. </p>
  
  <p><a href="https://stackoverflow.com/questions/44579300/how-to-ignore-empty-cell-values-for-getrange-getvalues">How to ignore empty cell values for getRange().getValues()</a></p>
  
  <pre><code>function myFunction() {
   var ss = SpreadsheetApp.getActiveSpreadsheet();
   var sheet = ss.getSheetByName("sample");
   var data = sheet.getRange("A1:E").getValues();
   var filtered = data.filter(String);
  Logger.log(filtered);
  }
  </code></pre>
  
  <p>In the code sample above, my log still shows all of the blank rows after the populated rows. If I change the A1 notation to A1:A, then it works, but I want to filter based on the whole row.</p>
  
  <p>Thanks for helping a newbie.</p>