title: TypeError: Cannot read property 'getDataRange' of null on trigger
body: <p>I keep getting this error on a couple of my google scripts and have never had this problem until the past week.  I have not changed my scripts.    </p>
  
  <pre><code>function importData2() {
  
  var sourceSpreadsheetID = "source spreadsheet ID";
  var sourceWorksheetName = "Lewis Ford of Dodge City - Flow";
  var targetSpreadsheetID = "target spreadsheet ID";
  var targetWorksheetName = "forddodgecity";
  
    var thisSpreadsheet = SpreadsheetApp.openById(sourceSpreadsheetID);
    var thisWorksheet = thisSpreadsheet.getSheetByName(sourceWorksheetName);
    var thisData = thisWorksheet.getDataRange().getValues();
    var toSpreadsheet = SpreadsheetApp.openById(targetSpreadsheetID);
    var toWorksheet = toSpreadsheet.getSheetByName(targetWorksheetName);
    toWorksheet.clearContents();
    toWorksheet.getRange(1, 1, thisData.length, thisData[0].length).setValues(thisData); 
  }
  </code></pre>