Home » excel » visual studio – How do you reference EPPlus dll?

visual studio – How do you reference EPPlus dll?

Posted by: admin March 9, 2020 Leave a comment

Questions:

Sorry to ask but how do you refernce EPPlus dll in a .NET project

Usually i just do something like using EPPlus; but did not work this time.

my research show

using OfficeOpenXml;
using OfficeOpenXml.Style;

I did not find it.

How to&Answers:

I fixed this by targeting the .net framework version 4

Answer:

using OfficeOpenXml; is correct for EPPlus. Check the Object Browser 🙂

Answer:

If Visual Studio is giving you grief over the using OfficeOpenXml;. You need to install NuGet Package Manager.

  • Simply go to the Visual Studio 2010 Menu > Tools
  • Select Extension Manager, Enter NuGet in the search box and click
    Online Gallery. Let it Retrieve information…
  • Select the retrieved NuGet Package Manager (you may have to do some
    scrolling to find it), click Download. Let it Download…
  • Click Install on the Visual Studio Extension Installer NuGet Package
    Manager. Wait for the installation to complete, and answer any
    prompts.
  • After the Package Manager is installed, you need to follow the prompt
    at the bottom of the Extension Manager window to restart Visual
    Studio.

After it opens back up, go to Visual Studio 2010 Menu > Tools > NuGet Package Manager > Manage NuGet Packages for Solution… And install EPPlus – Create advanced Excel spreadsheets using .NET.

This should get you set up reading Excel files!