I had developed a system that deals with excel sheets in 2006 using MS VS 2005. Now, I can not use the same reference with MS VS 2012.
```
var app = new Microsoft.Office.Interop.Excel.Application();
Workbooks wbs = app.Workbooks;
```
Comment reference Microsoft.Office.Interop.Excel dll?
Re: Comment reference Microsoft.Office.Interop.Excel dll?
**Use NuGet (VS 2013+):**
The easiest way in any recent version of Visual Studio is to just use the NuGet package manager. *(Even VS2013, with the [NuGet Package Manager for Visual Studio 2013](https://marketplace.visualstudio.com/items?itemName=NuGetTeam.NuGetPackageManagerforVisualStudio2013) extension.)*
Right-click on *"References"* and choose *"Manage NuGet Packages..."*, then just search for Excel.
**VS 2012:**
Older versions of VS didn't have access to NuGet.
- Right-click on "References" and select "Add Reference".
- Select "Extensions" on the left.
- Look for `Microsoft.Office.Interop.Excel`.
*(Note that you can just type "excel" into the search box in the upper-right corner.)*
**VS 2008 / 2010:**
- Right-click on "References" and select "Add Reference".
- Select the ".NET" tab.
- Look for `Microsoft.Office.Interop.Excel`.
The easiest way in any recent version of Visual Studio is to just use the NuGet package manager. *(Even VS2013, with the [NuGet Package Manager for Visual Studio 2013](https://marketplace.visualstudio.com/items?itemName=NuGetTeam.NuGetPackageManagerforVisualStudio2013) extension.)*
Right-click on *"References"* and choose *"Manage NuGet Packages..."*, then just search for Excel.
**VS 2012:**
Older versions of VS didn't have access to NuGet.
- Right-click on "References" and select "Add Reference".
- Select "Extensions" on the left.
- Look for `Microsoft.Office.Interop.Excel`.
*(Note that you can just type "excel" into the search box in the upper-right corner.)*
**VS 2008 / 2010:**
- Right-click on "References" and select "Add Reference".
- Select the ".NET" tab.
- Look for `Microsoft.Office.Interop.Excel`.