Excel DNA Questions and UDFs

34 views
Skip to first unread message

Heetesh Doorbiz

unread,
May 22, 2024, 6:36:29 AMMay 22
to Excel-DNA
Hi Govert,

I am new to Excel DNA and excel programming. So I have been tasked with creating an add-in for Excel. The addin has some requirements such as:
1. It has to be a binary file that is obfuscated and can be deployed to users and users can double click OR will be simple for them to add to their Excel Add-in via the File-> Options in excel.
2. The add-in will NEED to have custom UDFs.

I have been looking at Excel DNA and managed to create a Ribbon with UDFs.

Now, I've been told to keep developing on it and to redo the add-in using VSTO com add-in. I was wondering, is it possible to use Excel DNA for only the UDFs and Excel VSTO Add-in for the Ribbons, TaskPane etc... and somehow combine both code into a single binary file to distribute? 

It's been a nightmare trying to find a way to even implement UDFs in VSTO add-in so I think Excel DNA will be the saviour IF I can somehow use them both.

Thanks Govert for reading in advance.

Govert van Drimmelen

unread,
May 22, 2024, 7:25:37 AMMay 22
to Excel-DNA
Excel-DNA and VSTO don't work together in the same project.
But you can make two separate add-ins, though they won't share the same .NET AppDomain so they won't share types or static variables etc.

You can, however, load the Excel-DNA add-in with the UDFs from the VSTO add-in by calling Application.RegisterXLL. So, it's possible to distribute and install the two add-ins together.

Once you have figured out how to make a ribbon extension with Excel-DNA, it's not clear what benefit you get from VSTO.
The intention with Excel-DNA is that is can be used to make all aspects of an add-in.
You have full access to the Excel COM object model from Excel-DNA too.

-Govert

Reply all
Reply to author
Forward
0 new messages