Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function removeDuplicates() {
- const startTime = new Date();
- const newData = [];
- const sheet = SpreadsheetApp.getActiveSheet();
- const data = sheet.getDataRange().getValues();
- const numRows = data.length;
- const seen = {};
- for (var i = 0, row, key; i < numRows && (row = data[i]); i++) {
- key = JSON.stringify(row);
- if (key in seen) {
- continue;
- }
- seen[key] = true;
- newData.push(row);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement