Namespace error OfficeOpenXML EPPlus

user99999991 picture user99999991 · Jul 9, 2013 · Viewed 55.8k times · Source

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?

Answer

Jon Skeet picture Jon Skeet · Jul 9, 2013

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...