title: How to Remove Editors from Googlesheets Using Script
body: <p>I'm having trouble writing some JavaScript code in a googlesheet that will find all the current editors of the sheet (apart from the owner) and remove their edit writes. Currently I've been trying to use:</p>
  
  <pre class="lang-js prettyprint-override"><code>//remove the current editors and only allow the origional owner to have access.
  var SpreadSheet = SpreadsheetApp.getActiveSpreadsheet();
  SpreadSheet.removeEditor(SpreadSheet.getEditors())
  </code></pre>
  
  
  
  <p>This comes up with an "Invalid email:" with a string of editors emails. Is there a way to perhaps separate this email string then run the "removeEditor" code through a loop for the required number of editors that need to be removed?</p>