Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=14.0.0.0
Hello, I wrote a SSIS package to export a excel worksheet data to sql server. I am using SQL Server 2008 R2 version. I am able to run the package from IDE and it works fine. Now i am creating a SQL Job to run the SSIS package. I tried all the options - Setup the SSIS package to be run from File System (copied DLL to the local folder) as well as from SQL Server(MSDB). When i have the SSIS package setup in SQL Server (MSDB) and i try to run the package by providing the setup values it works fine. I am kind of clueless as to why it is working when in SQL server and not complaining about the DLL and not working from the sql job and throwing the below error message. I appreciate your help in this regard. Thanks ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Error Message ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Executed as user: USPGI\SQLClusterAdmin. Microsoft (R) SQL Server Execute Package Utility Version 10.50.2500.0 for 64-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. Started: 12:48:10 PM Error: 2012-07-17 12:48:28.89 Code: 0xC0047062 Source: Data Flow Task - Load LineData Script Component [3338] Description: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e) at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper100 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer100[] buffers, IntPtr ppBufferWirePacket) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. End Error Error: 2012-07-17 12:48:28.93 Code: 0xC0047038 Source: Data Flow Task - Load LineData SSIS.Pipeline Description: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Script Component" (3338) returned error code 0x80070002. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 12:48:10 PM Finished: 12:48:29 PM Elapsed: 18.844 seconds. The package execution failed. The step failed. -----------------
July 17th, 2012 5:29pm

can you check the GAC for 'Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'? it should be located in directory C:\Windows\assemblyMCTS, MCITP: BI Technical Consultant| Karabina, South Africa Blog: www.selectsifiso.net
Free Windows Admin Tool Kit Click here and download it now
July 18th, 2012 1:56am

if the assembly exist in GAC ensure that it is referenced by the project. if all the above is true, can you run the job under different account - it could be permissions issue. it is possible that user USPGI\SQLClusterAdmin does not have rights to directory - C:\Windows\assemblyMCTS, MCITP: BI Technical Consultant| Karabina, South Africa Blog: www.selectsifiso.net
July 18th, 2012 1:58am

Is the Job running on a server with office installed?Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter
Free Windows Admin Tool Kit Click here and download it now
July 18th, 2012 2:19am

Thank You all for the replies. Office is not installed on the server. Infact i did not see the 'Microsoft.Office.Interop.Excel, Version=14.0.0.0' DLL in GAC. So what i did was i got the DLL from my DEV pc and copied it to GAC on the server. It still does not work. I dont think its a permissions issue because job is invoked by SA. Do i need to install office on the server as i am referencing the DLL? Is it a mandatory? Can't i make it work without installing Office? Can i install just Office 2010 PIAs on the server without installing office and will that work? Thanks
July 18th, 2012 8:57am

actually no, you dont have to install office. but you will have to install excel adapters/drivers for ssis, they will in turn install relevant assemblies into GACMCTS, MCITP: BI Technical Consultant| Karabina, South Africa Blog: www.selectsifiso.net
Free Windows Admin Tool Kit Click here and download it now
July 18th, 2012 9:37am

The DLL is added by the office installation... It's not possible(/allowed?) to add only this dll to the server.Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter
July 18th, 2012 9:38am

actually no, you dont have to install office. but you will have to install excel adapters/drivers for ssis, they will in turn install relevant assemblies into GAC MCTS, MCITP: BI Technical Consultant| Karabina, South Africa Blog: www.selectsifiso.net Do you mean these? http://www.microsoft.com/en-us/download/details.aspx?id=13255 http://www.microsoft.com/en-us/download/details.aspx?id=23734 Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter
Free Windows Admin Tool Kit Click here and download it now
July 18th, 2012 9:41am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics