Retrieve Excel application from process id
问题 I am starting an Excel application using the Process class. I am able to get the process id & the main window handle with the code below. Process xlP = Process.Start("excel.exe"); int id = xlP.Id; int hwnd = (int)Process.GetCurrentProcess().MainWindowHandle; So this starts an Excel application. How do I reference this particular instance of Excel with the process id & main window handle? I have seen similar questions on here but the answer was a link to a webpage that no longer exists. I