Single XLL file rather than XLL + .dna file?

Jul 5, 2016 at 2:51 AM

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,

Jul 5, 2016 at 7:42 AM
Hi Mark,

The Google group at!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.

Jul 5, 2016 at 11:12 AM
Many Thanks Govert