Home » excel » c# – Embed excel sheet into WPF window

c# – Embed excel sheet into WPF window

Posted by: admin May 14, 2020 Leave a comment

Questions:

I have a WPF application that opens excel macros with the code

Process.Start("C:\My Library\MyFile.xlsm");

Now I want to run this sheet inside the WPF application. Is there any chance to open the excel sheet in a new WPF window, and run the macro?

Thanks for your help in advance.

How to&Answers:

It is not possible out of the box, to achieve such thing. You need to dig deep in msdn documentations about controls and libraries and how to reuse them.

So, I will suggest that you can use a third party “excel style” control.

You can check in this tutorial with a free tool – Spreadsheet Control.