How to release Excel instance from memory using ASP.NET

W

Wesley

Hi, I'm creating a report in Excel using asp.net, but I can't release the
Excel instance from memory. Excel.exe stays in the Windows Task Manager.

Below is an example of the code I'm using:

Dim appExcel As New Microsoft.Office.Interop.Excel.Application


appExcel.ActiveWorkbook.Close()
appExcel.Quit()
System.Runtime.InteropServices.Marshal.ReleaseComObject(appExcel)
appExcel = Nothing
GC.Collect()

Thanks,
Wesley
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top