The DllRegisterServer call just registers the .xll as the ‘server’ library for the COM objects.
So that is not linked to Excel.
But there are various parts of the .xll initialization that depends on it running inside Excel, so it won’t work as an out-of-process COM server.
For making a .NET library that you can access via COM in another program, you don’t need Excel-DNA though.
This functionality is part of .NET anyway.
If you search for “RegAsm” you’ll find the .NET-specific COM registration tool, and related documentation and articles from there.,
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/cb791271-d179-4c98-abff-eefa99d73722n%40googlegroups.com.
Excel-DNA .xll libraries can only be used inside the Excel process, and the Excel-DNA COM support only provides InProc COM server support.
So for your scenario you need to implement your own inter-process communication.
Then the ‘client’ part of the communication that runs inside Excel can be implemented as an Excel-DNA add-in, and you have some other ‘server’ part that is running outside Excel and implemented without Excel-DNA.
You might of course have the same .NET assemblies (independent of Excel-DNA) that are used on both sides of the communication.
For real-time feed into Excel, you add-in can implement an RTD server or expose a data stream based on the IObservable interfaces.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/aa583547-ba27-45bf-8bf9-ad7432f27d22n%40googlegroups.com.
For the case where you want to push data to VBA you would not use the Excel RTD server, but just raise events from the C# COM server.
See this discussion and snippets: https://groups.google.com/g/exceldna/c/lwJYjBA7XF0
You need to be very careful about the threading though, you need to be sure that the events are raised on the main Excel thread, and at a time where Excel and VBA is happy to process such events.
So you’re getting to the edge of complexity for integrating a .NET COM server with Excel and VBA safely.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/7d855134-9088-434c-86d8-f0f07811dcb6n%40googlegroups.com.
Hi
If you are looking at a two way coms or pub/sub you could use zeromq. From your description it sounds like you are after a pub/sub solution with your .Net App publishing to Excel Instances, either way zeromq can handle it. I had written a pub sub demo using zmq and ExcelDNA, essentially connecting two xll’s via tcp port. The demo code is here: https://github.com/ccrevola/Excel-DNA-Samples/tree/master/ExcelDnaZmq
Check out the zmq documentation: https://zeromq.org
Hope this helps
Craig.
To view this discussion on the web visit
https://groups.google.com/d/msgid/exceldna/72fea728-705a-4b90-95a3-f950c97b8f9en%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/114fac70-604a-4976-aa83-e3b4fbfd7adcn%40googlegroups.com.