If Visual Studio gives you grief over using OfficeOpenXml; You need to install the NuGet Package Manager.
- Just go to Visual Studio 2010 Menu> Tools
- Select Extension Manager, enter NuGet in the search field and click Online Gallery. Let him get the information ...
- Select the resulting NuGet package manager (you may need to scroll to find it), click Download. Let it Download ...
- Click Install in Visual Studio Extension Installer NuGet Package Manager. Wait for the installation to complete and answer all requests.
- After installing Package Manager, you must run the query at the bottom of the Extension Manager window to restart Visual Studio.
After it opens again, go to Visual Studio 2010> Tools> NuGet Package Manager> Manage NuGet Packages to Solve ... And install EPPlus - create advanced Excel spreadsheets using .NET.
This should force you to customize reading Excel files!
source share