title: Deleting sheets through script
body: <p>I've got this code going on:</p>
  
  <pre><code>function deleteSheets(){
   var ss = SpreadsheetApp.getActiveSpreadsheet();
   var sheets = ss.getSheets();
   var transp = ss.getSheetByName("aux").getRange("A2:A").getValues();
  
   var i =0;
   var c = 0;
   var name;
  
    for(i in sheets){
  
    for(c in transp){  
  
    var nome_transp = transp[c][0];
  
    switch(name = sheets[i].getName()){
  
  
         case name == transp[c]:
         ss.deleteSheet(sheets[i]);
         break;
  
        case name == "aux":
          ss.deleteSheet(sheets[i]);
          break;
  
        case name == "nulos":
          ss.deleteSheet(sheets[i]);
          break;
  
         case name == "Sem Transportadora":
          ss.deleteSheet(sheets[i]);
          break;
  
    }
  
  
  
  }
  
  }
  
  }
  </code></pre>
  
  <p>I can see through the debbuging that the counters and the values in "sheets" and "transp" are correct, but they never delete their respectives sheets, neither does the "aux", "nulos", and "Sem transportadora" ones. And yes, the sheets got the same name as the arrays.</p>
  
  <p>Any insights? Thanks in advance!</p>