I have the data of 300*8 cell in that 3rd row contains email on based of that i m protecting row by appscript. I m new to appscript and no background of coding or computer.
I have made the formula and normally running in individual row No but if I adding in to for loop it is not getting work
var ss = SpreadsheetApp.getActive();
var master = ss.getSheetByName("Master sheet");//in this sheet data present
ss.setActiveSheet(master, true);
for(i=0;i=10;i ++ ); {
var range = master.getRange(i+5,3).getValue();
var protection = master.getRange(i+5,1,1,6).protect();
var remove = protection.getEditors();
protection.setDescription(range).removeEditors(remove).addEditor(range);
}
}
If I put value instead of loop var i at row value then it work properly