I am using below sample code to copy only values from one sheet and paste to another. But here it paste my formula also from source file. I want only value and format(dont want formula) to be copied from source and paste to destination sheet. how it can be done in google spreadsheet scripts?
function copyInfo() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var copySheet = ss.getSheetByName("Copy");
var pasteSheet = ss.getSheetByName("Paste");
// get source range
var source = copySheet.getRange(2,2,12,2);
// get destination range
var destination = pasteSheet.getRange(pasteSheet.getLastRow()+1,2,12,2);
// copy values to destination range
source.copyTo(destination);
// clear source values
source.clearContent();
}