title: Create a daily portfolio tracker in Google Sheet, with importxml
body: <p>I'm trying to track the daily stock value and date of some stocks in a Google Sheet. Currently, the data capture code works well, but it replaces all values with new ones everytime a change happens. 
  In A2, i have a cell based on IMPORTXML that takes the date from Morningstar, and on B2, based on SUBSTITUTE(SUBSTITUTE(importxml(CONCATENATE... that takes the daily value from FT. </p>
  
  <p>My script code now is show next:</p>
  
  <pre><code>function saveData() {
    var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("sheet1");
    var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("sheet2")
  
    var current_date = sheet.getRange('Tracker!A2').getValues();
    var current_value = sheet.getRange('Tracker!B2').getValues();
  
    sheet.appendrow([current_date, current_value]);
  </code></pre>
  
  <p>Tracker is the name of the page. Running code tells me that I cannot getRange from null. What is the problem, please?</p>