Hi there, any help here would be appreciated!
Currently I have a sheet "latest scorecard" that contain 3 pivot tables and
the sheet gets updated weekly.
I want to write a script that will make a clone of "latest Scorecard" tab,
paste only the values and format (ex. conditional formatting) and rename
the tab as current date. The idea is when the "latest scorecard " tab get
refreshed weekly, we can have a backup sheet on previous weeks data.
The script I get so far is able to make a clone and rename the copied sheet
as current date, (BUT IT INCLUDES LINKAGE OF THE "SOURCE"). Can someone
advise how to edit the script in order to only paste value and format
instead of the whole pivot table source linkage.
here is my script
//create dashboard clone//
function cloneGoogleSheet() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var tz = ss.getSpreadsheetTimeZone();
var newDate= new Date();
var sheet = ss.getSheetByName('Latest QBR Scorecard').copyTo(ss);
var stringDate = Utilities.formatDate(newDate, tz, 'MM-dd-yy');
/* Make the new sheet active and rename to current date*/
ss.setActiveSheet(sheet).showSheet();
ss.renameActiveSheet(stringDate);
ss.moveActiveSheet(6);
}
Thank you so much!
--
You received this message because you are subscribed to the Google Groups
"Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.