title: Apps Script for Google sheet protection and giving permission to edit for multiple users
body: <p>I need help for a code to protect Google sheet and giving editing access to multiple users the ability to edit the protected sheet. I have tried the code below but I was able to allow myself to edit but I was not able to add in other email addresses to permit them to edit the sheet.</p>
  <pre><code>function protectRange() {
  // Protect the active sheet except 1:1 &amp; A:A, then remove all other users from the list of editors.
  var sheet = SpreadsheetApp.getActiveSheet();
  var protection = sheet.protect().setDescription('Protected sheet');
  protection.setUnprotectedRanges([sheet.getRange('1:1'),sheet.getRange('A:A')]);
  
  // Ensure the current user is an editor before removing others. Otherwise, if the user's edit
  // permission comes from a group, the script throws an exception upon removing the group.
  var me = Session.getEffectiveUser();
  protection.addEditor(me);
  protection.removeEditors(protection.getEditors());
  if (protection.canDomainEdit()) {
    protection.setDomainEdit(false);
  }
  }
  </code></pre>
  <p>I have tried to change the line for protection.addEditor(me); and add an array
  protection.addEditors([me,'abc@gmail.com','xyz@gmail.com']);</p>
  <p>but it does not work. What can I do?</p>
  <p>Thank you so much. Cheers</p>