How should I declare a Microsoft.Office.Interop.Excel.Worksheet so I can close it in C#?
<p>I am having a hard time making sure my COM objects are closing so I am not leaving an EXCEL.EXE process running in the background.  I have learned that the double dot and chaining of declarations is bad as this could leave COM objects hanging around.  </p>

<p>Does anyone know how to fix this line of code so I can properly close and release the worksheet COM object?</p>

<pre><code>worksheet = (Microsoft.Office.Interop.Excel.Worksheet)workbook.Sheets[strName];
</code></pre>

<p>EDIT:  I have tried using app.Quit() when I am done executing this line to close the open Excel object, however this does not work.  app.Quit() works if I call it before this line however.</p>