I am creating an excel application with c#. Since I will maintain the excel file in urgency I want to keep its handler open. I want to keep the excel process id so I will be able to kill it in case the system crashs.
How can I get the Excel Pid when creating it?
Here's an example of how to open an Excel file using Excel-Interop, and properly disposing the instance (source: google)