title: Showing errors while copying all values of a column from a google sheet and add them as editors in the spreadsheet
body: <p>I am trying to copy all values (emails) of column 6 from a Google sheet to an array and then add those emails to the spreadsheet as editors. </p>
  
  <p>But it shows: </p>
  
  <blockquote>
    <p>Exception: The parameters (number[]) don't match the method signature for SpreadsheetApp.Spreadsheet.addEditor.</p>
  </blockquote>
  
  <pre><code>function refreshSheet() { 
  
        var spreadsheet = SpreadsheetApp.getActive();
  
        //StudentList is a student information sheet where in Column F all the emails of students kept.  
        var sheet1 = spreadsheet.getSheetByName('StudentList');
  
        //Need to bring all students emails from Column of StudentList sheet to students array. 
        var data = sheet1.getLastRow();
        var students = [];
        var students = sheet1.getRange(2, 6, data).getValues();  
  
        var ssId = SpreadsheetApp.getActiveSpreadsheet().getId();
        var ss = SpreadsheetApp.openById(ssId);
        for (var i=0; i&lt;students.length; i++){
          ss.addEditor(students[i]); 
        }  
  
        //Now start a timer and after 5/10/15 minutes all students should be removed automatically from Editor to Viewer Mode.    
        Utilities.sleep(300000);
        Utilities.sleep(300000);
        Utilities.sleep(300000);
        for (var i=0; i&lt;students.length; i++) {
            ss.removeEditor(students[i]);
        } 
      }
  </code></pre>