Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel Download using Microsoft.Interop.Excel


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft.Office.Interop.Excel myexcel = new EXCEL.Application() samsonk Excel Programming 7 March 29th 13 04:03 AM
Cannot Get Instance of Com component Microsoft.Office.Interop.Excel.Worksheetwith Excel Interface Error. Michael G.[_2_] Excel Programming 5 August 30th 09 03:39 PM
Error in excel com: Microsoft.Office.Interop.Excel Exception from HRESULT: 0x800A03EC srinivas[_3_] Excel Programming 3 May 29th 09 02:13 PM
Imports Excel = Microsoft.Office.Interop.Excel doesn't work Uncle Martin Excel Programming 3 July 29th 07 01:44 AM
Microsoft.Office.Interop.Excel Texttocolumns C# Cheryl[_5_] Excel Programming 1 April 6th 07 08:40 PM


All times are GMT +1. The time now is 06:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"