function doGet(e) { return ManageSheet(e); } function doPost(e) { return ManageSheet(e); } function ManageSheet(e) { //READ ALL RECORDS if ( e.parameter.func == "ReadAll") { var ss = SpreadsheetApp.getActive(); var sh = ss.getSheets()[0]; var rg = sh.getDataRange().getValues(); var outString = ''; for(var row=0 ; row= 0; i--) { var currentRow = values[i]; // Create a slice of 'currentRow' from column B (index 1) to column K (index 10) var currentRowSlice = currentRow.slice(1, 11); // This gets elements from index 1 to 10 (B to K) // Compare only the specific slices from column B to column K if (currentRowSlice.length === toDeleteSlice.length && currentRowSlice.every((cell, index) => cell === toDeleteSlice[index])) { sheet.deleteRow(i + 1); // Delete the matched row, accounting for 1-indexed rows return ContentService.createTextOutput('Row deleted successfully.'); } } return ContentService.createTextOutput('No matching row found.'); } }