title: I cant get this formula to work correctly in the target cell. What is wrong with my formula notation?
body: <p>I cant get this formula to work correctly in the target cell.  What is wrong with my formula notation?</p>
  
  <p>The offending formula, which im trying to generate using the code below, should look like this <strong>=importRange("0Ak-----------------------VkE5M2c","clan members!A1:D172")</strong> in the target cell. but it does not</p>
  
  <pre class="lang-js prettyprint-override"><code> var source = SpreadsheetApp.getActiveSpreadsheet();
   var target = SpreadsheetApp.openById("0Ak-----------------------VkE5M2c");
   var insert_sheet = target.getSheetByName("Point Rank Sheet");
   var target_sheet = target.getSheetByName("clan members");
   var last_row = target_sheet.getLastRow();
   insert_sheet.insertRowAfter(last_row);     
   var values = source.getSheetByName("Form Data").getRange("A2:E2").getValues();
   target.getSheetByName("clan members").getRange("A"+(last_row+1)+":E"+(last_row+1)).setValues(values);
   var formula_cell = insert_sheet.getRange("A1:A1");
   var formula = '=importRange("0Ak-----------------------VkE5M2c","clan members!A1:D"+(last_row+1))';
   formula_cell.setFormula(formula)
  </code></pre>