customSection question

Apr 5, 2014 at 3:45 AM
Edited Apr 5, 2014 at 3:49 AM
Can I make a customSection in an Excel-DNA config file?

I know that that Excel-DNA is able to pick up appSettings from a config file. Smooth sailing BTW. But is it actually possible to use custom sections in an Excel-DNA config file?

And how is it picked up? I mean how does Excel-DNA treat a config file?

All the best
Apr 5, 2014 at 10:46 AM

Yes - that should work just fine, as normal.

Excel-DNA looks for a file called <YourAddIn>.xll.config that is found next to the .xll file, and loads it as the configuration file for the AppDomain that is created. So it can be used with the .NET configuration classes just like a regular .exe.config file.

As an example, NLog uses a customSection, and seems to work fine - check here:
For making your own, you should check the regular .NET documentation regarding customSections.