I'm having difficulty setting up EPPlus in Visual Studio 2012.
using OfficeOpenXML;
The type or namespace name 'OfficeOpenXML' could not be found(are you missing a using directive or an assembly reference?)
Now I tried 2 different ways to set EPPlus up.
I manually added a Project->Add Reference to the Epplus.dll file in my documents.
I also tried to use NuGet package manager console: PM> Install-Package EPPlus
I clearly see EPPlus is added to the References in my project, but the namespace for OfficeOpenXML is not added. How do I add this namespace with the EPPlus reference?
I believe this is just a problem of casing. This:
using OfficeOpenXML;
should be:
using OfficeOpenXml;
Note the lower case "M" and "L" at the end.
I say that based only on the sample code...
I had only installed DocumentFormat.OpenXml
and the reference would not work despite following other sources on the net.
I had to install, through NuGet, both DocumentFormat.OpenXml
AND EPPlus
to get the reference to work.
That fixed this for me.
I had the same issue, check that your project's Target Framework (Right click on your project -> Properties, check "Target framework") is not set to any .NET framework X "Client Profile" frameworks. Client profile is a minified version of whatever framework you are using.
With regards to EPPlus, your project must be using the full framework and not any "Client Profile" frameworks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With