Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() We are using Microsoft.Interop.Excel in our dotnet web application for downloading the data in the excel. Once the download is completed the excel object is not getting killed or released from the memory automatically (The EXCEL.EXE*32 process still appears in the Task Manager). When ever the "Download" button is clicked a new EXCEL.EXE process is getting created but not cleared disposed from the memory. This EXCEL.EXE process resides in the task manager unless it is killed manually. Below is the code block which we have written to dispose the excel object from the memory. /* Code Block starts */ Excelworkbook.Close(false, WorkBookPath, false); Excelapp.Quit(); System.Runtime.InteropServices.Marshal.ReleaseComO bject(objExcelcellRange); System.Runtime.InteropServices.Marshal.ReleaseComO bject(objExcelworksheet); System.Runtime.InteropServices.Marshal.ReleaseComO bject(objExcelsheets); System.Runtime.InteropServices.Marshal.ReleaseComO bject(objExcelworkbook); System.Runtime.InteropServices.Marshal.ReleaseComO bject(objexcelapp); objExcelworksheet = null; objExcelsheets = null; objExcelworkbook = null; objExcelapp = null; GC.Collect(); /* Code Block ends */ Steps we tried to resolve this issue 1. Added "Network Service" User in the DCOMCONFIG -- Microsoft Excel Application -- Security -- Configuration Settings and gave full control. The above step didn't work. Please suggest how we can dispose the EXCEL object from the memory using Interop services through code. Thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Microsoft.Office.Interop.Excel myexcel = new EXCEL.Application() | Excel Programming | |||
Cannot Get Instance of Com component Microsoft.Office.Interop.Excel.Worksheetwith Excel Interface Error. | Excel Programming | |||
Error in excel com: Microsoft.Office.Interop.Excel Exception from HRESULT: 0x800A03EC | Excel Programming | |||
Imports Excel = Microsoft.Office.Interop.Excel doesn't work | Excel Programming | |||
Microsoft.Office.Interop.Excel Texttocolumns C# | Excel Programming |