title: How to insert data into a specific row number (or the first empty row)?
body: <p>I'm using <a href="http://ithoughthecamewithyou.com/post/automate-google-pagespeed-insights-with-apps-script" rel="noreferrer">this super-handy script</a> to get Google PageSpeed Insights metrics into a Google spreadsheet (thanks to the author):</p>
  
  <pre><code>var pageSpeedApiKey = 'AIzaSyDRgiUgu9Y3xVur0Xf0TdUmxgOYfltLFW4';
  var pageSpeedMonitorUrl = 'http://www.sauder.ubc.ca';
  
  function monitor() {
    var mobile = callPageSpeed('mobile');
    var desktop = callPageSpeed('desktop');
    var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
    var sheet = spreadsheet.getSheetByName('GooglePageSpeedInsightsData');
    sheet.appendRow([
                     Utilities.formatDate(new Date(), 'GMT', 'yyyy-MM-dd'),
                     mobile.score,
                     desktop.score
                    ]);
  
      // more available, i.e. desktop.pageStats.numberResources
  }
  
  function callPageSpeed(strategy) {
    var pageSpeedUrl = 'https://www.googleapis.com/pagespeedonline/v1/runPagespeed?url=' + pageSpeedMonitorUrl + '&amp;key=' + pageSpeedApiKey + '&amp;strategy=' + strategy;
    var response = UrlFetchApp.fetch(pageSpeedUrl);
    var json = response.getContentText();
    return JSON.parse(json);
  }
  </code></pre>
  
  <p>I'm using another script that adds a blank row on row 3 to my sheets to keep all my data in reverse chronological order as new data comes in.</p>
  
  <p>So instead of <em>appending</em> to the last row, I need it inserted into "row 3", or to "the first empty row"!</p>