title: Problem with closing excel by c#
body: <p>I've got unit test with this code:</p>
  
  <pre><code>  Excel.Application objExcel = new Excel.Application();
              Excel.Workbook objWorkbook = (Excel.Workbook)(objExcel.Workbooks._Open(@"D:\Selenium\wszystkieSeba2.xls", true,
              false, Missing.Value, Missing.Value, Missing.Value,
              Missing.Value, Missing.Value, Missing.Value,
              Missing.Value, Missing.Value, Missing.Value,
              Missing.Value));
  
  
              Excel.Worksheet ws = (Excel.Worksheet)objWorkbook.Sheets[1];
              Excel.Range r = ws.get_Range("A1", "I2575");
              DateTime dt = DateTime.Now;
              Excel.Range cellData = null;
              Excel.Range cellKwota = null;
              string cellValueData = null;
              string cellValueKwota = null;
              double dataTransakcji = 0;
              string dzien = null;
              string miesiac = null;
              int nrOperacji = 1;
              int wierszPoczatkowy = 11;
              int pozostało = 526;
  
              cellData = r.Cells[wierszPoczatkowy, 1] as Excel.Range;
              cellKwota = r.Cells[wierszPoczatkowy, 6] as Excel.Range;
  
  
              if ((cellData != null) &amp;&amp; (cellKwota != null))
              {
  
                  object valData = cellData.Value2;
                  object valKwota = cellKwota.Value2;
  
  
                  if ((valData != null) &amp;&amp; (valKwota != null))
                  {
                      cellValueData = valData.ToString();
                     dataTransakcji = Convert.ToDouble(cellValueData);
                     Console.WriteLine("data transakcji to: " + dataTransakcji);
                      dt = DateTime.FromOADate((double)dataTransakcji);
                     dzien = dt.Day.ToString();
                     miesiac = dt.Month.ToString();
  
  
                      cellValueKwota = valKwota.ToString();
  
  
                  }
    }
  
                         r.Cells[wierszPoczatkowy, 8] = "ok";
              objWorkbook.Save();
  
  
  
              objWorkbook.Close(true, @"C:\Documents and Settings\Administrator\Pulpit\Selenium\wszystkieSeba2.xls", true);
                  objExcel.Quit();
  </code></pre>
  
  <p>Why after finish test I'm still having excel in process (it does'nt close)</p>
  
  <p>And : is there something I can improve to better perfomance ??</p>
  
  <p>Excel 2007 and .net 3.5</p>