I need to add the Microsoft.Office.Interop.E
xcel namespace reference so I can apply an Excel macro in a SSIS Script Transformation Component. When I edit the Script Transformation and go to add a Reference, Microsoft.Office.Interop.E
xcel does not exist. I've made sure that .NET Programmability Support was selected when I installed Microsoft Office and I've also installed the Visual Studio 2010 Tools for Office Runtime.
The code I need to add looks like this but it don't build without the namespace reference. Thanks!!
Excel.Application xlApp = new Excel.Application();
Excel.Workbook xlWorkBook = xlApp.Workbooks.Open("C:\\ExcelDirectory\\DATA.xlsm"); // absolute path needed
xlApp.Run("Formatting"); // method overloads allow you to send it parameters, etc.
xlWorkBook.Close(true); // first parameter is SaveChanges