Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel and VB.Net
I want to use Excel Object in my .NET application, that
is COM object in .NET environment. Now, I can start Excel as Excel.Application(), after referencing in Excel library. In this case I have a total control of Excel object, but it is almost impossible to close it. Classic methods obExcel.Quit, and obExcel = Nothing would not help. Namely, Excel apparently closes but in the Task Manager it can be seen still running. This is known 'memory leak' and although I've been searching for solution for weeks, I could not find one that works. So after few times opening and closing Excel in VB.NET code there is a bunch of Excel object instances, clogging my memory resources. On the other hand I can also launch Excel with a process, in which case I can properly close Excel so it is gone out of memory, however I do not have control of Workbooks, Worksheets, Excel functions etc. Now I was wondering if somebody could possibly know if it is possible (and how) to maybe launch Excel as a process and then associate this instance of Excel with the process, OR, create Excel.Application object and then associate it with a process (somehow get processID). In both cases I would have control over Excel object, and would be able to kill it clean, and empty the memory. Any help would be welcome. thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|