Add reference only of "Microsoft.Office.Interop.Excel.dll"
try
{
excelApp = (Excel.Application)Marshal.GetActiveObject("Excel.Application");
excelApp.Visible = false;
}
catch
{
excelApp = new Excel.Application();
excelApp.Visible = false;
}
This worked for me.
Advantage: No need to copy Microsoft.Office.Interop.Excel.dll to your installed foler. Since MS excel is installed it will take from GAC.
I used Office.dll too but not sure if its really required.