How to make a WPF application as an OLE object that can be embedded in MS Excel?

I want to make my WPF application as an OLE object that you can insert and run from MS-Excel.

When I open Excel-2003 and go to Insert-> Object, the list of OLE objects is displayed on the Create New tab. I want to register my WPF application as an OLE object so that it also appears in the list. The user can paste and run the application from an Excel file.

+3
source share
1 answer

Well, it has been a long time since you asked, but I don’t think there is a reasonable way to achieve your goal in terms of creating a WPF OLE object application for direct embedding. The technologies are very different, and although there may be some obscure way of interacting through COM, you would probably save a lot of time by adopting a different approach.

For example, if you are just trying to "luanch" an application from Excel, create an OLE object that "launches" your WPF application, instead of trying to make them the same.

As for interaction, here are a few more readings.
http://en.wikipedia.org/wiki/Object_Linking_and_Embedding#Interoperability
http://en.wikipedia.org/wiki/Component_Object_Model
http://en.wikipedia.org/wiki/COM_Interop

, / , , , .

+1

Source: https://habr.com/ru/post/1766897/


All Articles