Single XLL file rather than XLL + .dna file?

Jul 5, 2016 at 3:51 AM
HI,

New to the project, so sorry if this is an eye roll question, but as near as I can make out if I want to build an Excel UDF, I need the .xll file and an associated .dna file with the script in it

My question is whether or not it is possible to bundle everything inside the one .xll file, rather than needing to distribute the two files?

If so, would someone be so good as to point me to where I could learn more about it?

Thanks in advance,

Mark
Coordinator
Jul 5, 2016 at 8:42 AM
Hi Mark,

The Google group at https://groups.google.com/forum/#!forum/exceldna is a better place for Excel-DNA discussion - we're moving away from CodePlex.

Excel-DNA has a utility called ExcelDnaPack that packs your .dna file and any other assemblies you reference into the .xll file.
ExcelDnaPack is part of the distribution, and just just run it as "ExcelDnaPack MyAddIn.dna" and it makes the single file .xll.

Even if you're just getting started, I suggest you:
  • Install the free Community Edition of Visual Studio.
  • Create a new Class Library project in VB.NET or C#.
  • Install the "ExcelDna.AddIn" package from the NuGet package manager.
That will create a project that you can debug, with the packing into a single file already configured as well.
Even if you've never used Visual Studio, that's probably the easier route.

Please follow up on the Google group if you run into any snags.

-Govert
Jul 5, 2016 at 12:12 PM
Many Thanks Govert