Need to open an instance of excel in the same process as my main program.
-
My software is an excel plug-in. We are using the C++ unit test framework embedded within Visual Studio to test it. Now, in my C++ unit test-code, when I open excel ( e.g. through shellexecute ), Excel opens up in a separate process and hence, I am not able to test my add-in code in the test process. How do I attach to the excel programatically so that I can follow the behaviour in the same process. It's a unit-test scenario and hence, we are trying to do everything with least manual intervention. Regards, Raj Abhishek
-
My software is an excel plug-in. We are using the C++ unit test framework embedded within Visual Studio to test it. Now, in my C++ unit test-code, when I open excel ( e.g. through shellexecute ), Excel opens up in a separate process and hence, I am not able to test my add-in code in the test process. How do I attach to the excel programatically so that I can follow the behaviour in the same process. It's a unit-test scenario and hence, we are trying to do everything with least manual intervention. Regards, Raj Abhishek
You need add the Interop.Excel.dll to your project. With that dll you can create a excel application to handle menus, bars, and so on. The documentation is [here]