0

I have a google script that runs monthly so I can compare changes between two sheets so I can track monthly movements and differences. The script is working fine as below

function makeTabs() {

  var formattedDate = Utilities.formatDate(new Date(), "GMT", "yyyy-MM-dd");
  var tabName =  "Data " + formattedDate;
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName('Combined (Read Only)').copyTo(ss);



  SpreadsheetApp.flush(); // Utilities.sleep(2000);
  sheet.setName(tabName);

  /* Make the new sheet active */
  ss.setActiveSheet(sheet);



}

The problem here is the script is copying across all the formulas as well which means the values are updating and I don't need that to happen. I just want to make a copy of the sheet values only

Rubén
  • 34,714
  • 9
  • 70
  • 166
Grimlockz
  • 2,541
  • 7
  • 31
  • 38
  • Check this thread [enter link description here](https://stackoverflow.com/questions/14864831/google-apps-script-copyto-using-contentsonlytrue-not-working). – ross May 01 '19 at 13:29
  • Sorry, check this thread [copyTo using contentsOnly](https://stackoverflow.com/questions/14864831/google-apps-script-copyto-using-contentsonlytrue-not-working). – ross May 01 '19 at 13:36
  • 1
    Possible duplicate of [Google Apps Script - copyTo using {contentsOnly:true} not working](https://stackoverflow.com/questions/14864831/google-apps-script-copyto-using-contentsonlytrue-not-working) – TheMaster May 01 '19 at 14:02

0 Answers0