0

I want clean Inactive/Ideal excel processes which have 0 CPU usages. Mean While generating excel report, If we close the browser, excel remains open. I want to find such processes and close it.

How to achieve it using C#?

kopradip
  • 41
  • 1
  • 4
  • 1
    Just don't use Excel through interop. Use a library like EPPlus to create an Excel file without having Excel installed. As for your specific problem, it's impossible to help without the code. If you used `using` to dispose of objects properly, you wouldn't have an issue – Panagiotis Kanavos Jan 27 '17 at 09:39
  • @PanagiotisKanavos The application is already hosted on Production Server, in gives issues once in month when multiple Inactive excel processes remains opened, And stops generating new excel reports. Near about after 10 excel inactive processes, report generations stops. That is the reason I need to find such inactive processes and close them. – kopradip Jan 27 '17 at 10:16
  • I can rewrite the code using EPPlus or OpenXML. But for now need to overcome with the above issue. – kopradip Jan 27 '17 at 10:17
  • Possible duplicate of [How do I properly clean up Excel interop objects?](http://stackoverflow.com/questions/158706/how-do-i-properly-clean-up-excel-interop-objects) – UndeadBob Feb 08 '17 at 19:06

0 Answers0