title: getFormulas() and setFormulas() convert references to #REF
body: <p>I have a problem with my spreadsheet not refreshing an <code>=IMPORTRANGE</code> formula. I've tried all the tricks with sharing permissions and spreadsheet settings, but they don't work for me.</p>
  
  <p>What I'm trying to do instead is create a simple macro that wipes the formula and re-enters it to refresh the import. When I run my macro, my formulas turns into <code>#REF</code>.</p>
  
  <pre><code>var ss = SpreadsheetApp.getActiveSpreadsheet();
  var startingSheet = ss.getActiveSheet();
  
  var importRange = ss.getRangeByName("MasterImport");
  var importFormulas = importRange.getFormulas();
  importRange.clearContent();
  importRange.setFormulas(importFormulas);
  </code></pre>
  
  <p>My formula in named range "MasterImport" looks like this afterwards:</p>
  
  <pre><code>=IMPORTRANGE(#REF!, index(indirect(index(#REF!, match("asset_tab", #REF!, 0))),
      match(#REF!, indirect(index(#REF!, match("series_id", #REF!, 0))), 0)))
  </code></pre>