title: Google Apps Script: Copy and Paste Formulas Only
body: <p>I need to copy and paste Formulas only in a spreadsheet using Google Apps Script</p>
  
  <pre><code>var range = activeSheet.getRange(targetRow-1, 1, 1, activeSheet.getLastColumn());
  range.copyTo(activeSheet.getRange(targetRow, 1, 1, activeSheet.getLastColumn()), {contentsOnly:false});
  </code></pre>
  
  <p>This give me the full information, including the formulas and data. However, I wish to only copy the formulas (without data).</p>
  
  <p><code>CopyFormulasToRange</code> unfortunately does not exists.</p>