Excel exe is not getting closed ,even if we do GC.COllect relesing com object in asp.nethttp://forums.asp.net/t/1793597.aspx/1?Excel+exe+is+not+getting+closed+even+if+we+do+GC+COllect+relesing+com+object+in+asp+netWed, 18 Apr 2012 11:16:54 -040017935974935814http://forums.asp.net/p/1793597/4935814.aspx/1?Excel+exe+is+not+getting+closed+even+if+we+do+GC+COllect+relesing+com+object+in+asp+netExcel exe is not getting closed ,even if we do GC.COllect relesing com object in asp.net <p>GC.Collect()<br> GC.WaitForPendingFinalizers()<br> FinalReleaseComObject(xlSheets)<br> FinalReleaseComObject(xlBook)<br> FinalReleaseComObject(xlBooks)<br> FinalReleaseComObject(xlExcel)<br> FinalReleaseComObject(wrksht)<br> 'FinalReleaseComObject(xlCells)<br> xlExcel = Nothing<br> xlBooks = Nothing<br> xlBook = Nothing<br> xlSheets = Nothing<br> wrksht = Nothing<br> xlCells = Nothing</p> 2012-04-17T05:14:13-04:004935820http://forums.asp.net/p/1793597/4935820.aspx/1?Re+Excel+exe+is+not+getting+closed+even+if+we+do+GC+COllect+relesing+com+object+in+asp+netRe: Excel exe is not getting closed ,even if we do GC.COllect relesing com object in asp.net <p>Give it a look first:</p> <p><a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2">http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2</a></p> 2012-04-17T05:18:19-04:004938711http://forums.asp.net/p/1793597/4938711.aspx/1?Re+Excel+exe+is+not+getting+closed+even+if+we+do+GC+COllect+relesing+com+object+in+asp+netRe: Excel exe is not getting closed ,even if we do GC.COllect relesing com object in asp.net <p>try with the following</p> <pre class="prettyprint">// Garbage collecting GC.Collect(); GC.WaitForPendingFinalizers(); // Clean up references to all COM objects // As per above, you're just using a Workbook and Excel Application instance, so release them: workbook.Close(false, Missing.Value, Missing.Value); Marshal.FinalReleaseComObject(workbook); Marshal.FinalReleaseComObject(xlApp);</pre> <p></p> 2012-04-18T11:16:54-04:00