title: Google Apps Script Copy Range From One SpreadSheet To Another With Formats / Formulas
body: <p>This code works well, but I am having difficulty determining how to copy the formats as well as formulas along with the data. I would value any help, please. </p>
  
  <pre><code>  var MyWBA = SpreadsheetApp.openById('1234567');
    var MySHA = MyWBA.getSheetByName('Expense');
    var SRange = MySHA.getDataRange();
    var A1Range = SRange.getA1Notation();
    var SData = SRange.getValues();
  
    var MyWBB = 
    SpreadsheetApp.openById('122454');
    var MySHB = MyWBB.getSheetByName('Income');
    MySHB.getRange(A1Range).clearContent()
    MySHB.getRange(A1Range).setValues(SData);
  </code></pre>