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;
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 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.
Microsoft.Office.Interop.Excel
.VS 2008 / 2010:
Microsoft.Office.Interop.Excel
.