I am currently trying to get a sheet to copy to a new tab within the same workbook which is working perfectly fine. However I cannot seem to copy over the the values and format only and the formulas keep coming with it. I have tried to use "{contentsOnly:true}" but it keeps giving me all sorts of errors.
Is anyone able to help with this please
function onOpen() {
var ui = SpreadsheetApp.getUi();
// Or DocumentApp or FormApp.
ui.createMenu('SUBMIT')
.addItem('SUBMIT', 'menuItem1')
.addToUi();
}
function menuItem1() {
SpreadsheetApp.getUi() // Or DocumentApp or FormApp.
moveValuesDown();
}
function moveValuesDown() {
var ss = SpreadsheetApp.getActiveSpreadsheet()
ss.getSheetByName('Abandoned Phone Calls')
.copyTo(ss)
.setName(Utilities.formatDate(new Date(ss.getSheetByName('Abandoned Phone Calls')
.getRange(1, 1)
.getValue()), Session.getScriptTimeZone(), "dd MMM yy" ))
}
I have also attached a copy of the sheet i am working on - thanks in advance