title: Error while deleting worksheet from a Excel workbook
body: <p>I need to delete some sheets from an Excel workbook in C#. </p>
  
  <p>But, my code does not work. </p>
  
  <pre><code>    // **aDeleteList** hold the sheets that need to be deleted from the workbook wbk
      static void delete_sht(ref MsExcel.Workbook wbk, List&lt;string&gt; aDeleteList)
      {
          MsExcel.Sheets my_st = wbk.Sheets;
          foreach (MsExcel.Worksheet s in my_st)
          {
              if (aDeleteList.Contains(s.Name))
                  s.Delete();
              int t1 = my_st.Count;
              int t = wbk.Sheets.Count;
          }
      }
  </code></pre>
  
  <p>The values of t and t1 do not change no matter </p>
  
  <pre><code>          s.Delete()
  </code></pre>
  
  <p>has been executed.</p>
  
  <p>Any help would be appreciated.</p>