ExcelDNA with ODP.NET

Dec 15, 2011 at 9:50 AM

Hi, I have an xll running beautifully with ExcelDNA, but now I have to add ODP.NET into it and I need to change its DLLPath setting. The ODP.NET documenation tells me to add the following into app.config:

      <add name="DllPath" value="C:\file location"/>

However, when I put this into my .xll.config file, Excel refuses to load the xll any more, giving me the following error:

There is an error in XML document (0, 0).
The type initializer for 'System.Xml.Serialization.XmlSerializationReader' threw an exception.

Strangely I do not get this on both the two computers I am using (testing different user environments), but only on one of them. Is there some other setting I need on the machine to get it to recognise this as valid?

Dec 15, 2011 at 10:03 AM

Hi Eleanor,

It looks like the configuration system can't read your .config file.

Maybe there is some registration needed for the configuration system to read that <oracle... > tag (say in machine.config). You could make a small stand-alone .exe application that has a .config file using the same settings. Then try that on the different machines. At least that might take Excel and Excel-DNA out of the question.

Else it might be a permissions issue?


Dec 15, 2011 at 10:16 AM

Thanks - adding oracle.dataaccess.client as a section to machine.config file fixed it. I think I have a deeper problem in that it doesn't appear to actually be doing anything, but that's not ExcelDNA's fault. May be the same root cause as not having the entry in the machine.config in the first place so this has been helpful.