I'm trying to avoid removing rows from sheets when copying and removing duplicates to another specified sheet.
In this case, the 'TestSheet' sheet is removing rows (The sheets need to stay static). I'd like to send the range to an array and manipulate the data there, and then add to another sheet (or export to csv eventually). Any help would be appreciated! Here's the code:
function copyNSavetest(){
var ss = SpreadsheetApp.getActive();
var scanSheetSheet = ss.getSheetByName('TestSheet');
var scannedContents = [];
var scannedContents = scanSheetSheet.getRange("A2:C500");
Logger.log(scannedContents.getValues());
scannedContents.removeDuplicates([1]);
Logger.log(scannedContents.getValues());
}