title: How can I store a range of cells to an array?
body: <p>If I have a list of data in cells A1:A150 (but the amount can vary), is there a way to push that into an array without looking at each cell individually to determine if it is empty? I exceed my execution time by doing this and I need a faster way to store the data and stop when it hits an empty cell.</p>
  
  <p>Below is how I currently do it:</p>
  
  <pre><code>for (var i = 1; i &lt; 500; i++) {
    if(datasheet.getRange("A" + i).getValue() == ""){
     break;   
    }
  
    else{
       addedlist_old.push(datasheet.getRange("A" + i).getValue())
      }
  </code></pre>