Creating excel file through SSIS package throwing COM Exception error

Answered Creating excel file through SSIS package throwing COM Exception error

  • Tuesday, February 12, 2013 7:56 PM
     
     

    I am using SSIS component under SQLSERVER BI TOOLS

    I have created an script task for creating excel file & then loading the data into excel file. Also i have reffered the dlls required for creating excel file i.e..Microsoft.Office.Interop.Excel. In this machine i don't have an MS Office installation setup. while executing this script task it is throwing below error

    Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154.
       at ST_1568e3454381415cba6bcc0ad3ae38b0.csproj.ScriptMain.PrintToExcel(DataSet ds_PrintToExcel)
       at ST_1568e3454381415cba6bcc0ad3ae38b0.csproj.ScriptMain.Main()
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()

All Replies