I'm new in the area and I need to run a script for SSIS project.
Here's the script:
public void Main()
{
var server = Dts.Variables["ExcelFileName"].Value as string;
var xlApp = new Microsoft.Office.Interop.Excel.Application();
xlApp.Workbooks.Open(server);
xlApp.Run("ResetReport");
xlApp.ActiveWorkbook.Close(true);
xlApp.Quit();
Dts.TaskResult = (int)ScriptResults.Success;
}
However when I tried to run SSIS package I'm getting Run time error. I was looking for an answer but could not find the one that would help me.
I have MS Visual Studio 2012, Net Framework 4.8.
Can somebody assist me with fixing this error?