Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

How to release Interop COM excel object by C#

$
0
0

Hi

  I have developed winform application to get details of excel application which currently  running in user machine.Using "AccessibleObjectFromWindow" I have reterived current excel file details and applied to new Excel.Application object .After completing functionality I have did object releasing using 

Marsharl.ReleaseComObject(Excel.worksheet),

Marsharl.ReleaseComObject(Excel.Workbook),

Marsharl.ReleaseComObject(Excel.application)

Issue:

But I am facing issue here like object is not released even if the physical file is closed.

I have tried  Excel.workbook.close() approach, but its closed the physical file itself before user close the file.

Kindly guide me how to  release Excel.Application,Excel.Workbook,Excel.Worksheet object    , dispatch from original resource of file.

Thanks ,

Meenakshi k


Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>