I have developed a DTS with SQL Data Tools that has a "Script task" that uses Microsoft.Office.Interop.Excel, the main purpose of this is to create a XLS file, when i debug the solution, it runs perfect, but when i programmed the DTS in a JOB, it gives me an error. The server is located in another side, do i have to paste the DLL in the server?
Asked
Active
Viewed 475 times
3
-
1Using office automation in a server side process is a very bad idea and is not supported by Microsoft. As you have discovered, such programs can work fine in one environment and plain not work in another. Do not use office automation in a server process. – user469104 Nov 11 '15 at 18:49
-
Do u have any ideas? I also tried two ways: 1st-use the EPPLUS library in order to create the XLS and 2nd-use the tool "Excel Destination" – EGSL Nov 11 '15 at 18:56
-
yes, use EPPlus, it can be used from a server process – user469104 Nov 11 '15 at 18:58
-
i used the EPPLUS but when i run the JOB it gave me this error: Message Executed as user: [Proxy User]. Microsoft (R) SQL Server Execute Package Utility Version 11.0.5058.0 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 4:52:47 PM Error: 2015-11-10 16:54:35.20 Code: 0x00000001 Source: [Name of the task: Guardar tabla Validacion en un EXCEL 2] Description: Exception has been thrown by the target of an invocation. – EGSL Nov 11 '15 at 19:05
-
End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 4:52:47 PM Finished: 4:54:35 PM Elapsed: 107.704 seconds. The package execution failed. The step failed. Do i have to paste the EPPLUS DLL in the server? – EGSL Nov 11 '15 at 19:07
-
Yes, EPPlus would need to be available to the DTS runtime environment if you are using scripts dependent of EPPlus – user469104 Nov 11 '15 at 19:27
-
The Excel Interop if I am not mistaken is installed by installing Excel itself. You would need to install Excel on the server its executing from to use that which is not recommended like folks said. If there is not an issue with this then ok give that a try if so then EPPlus or I have used the Open XML SDK for Office for Excel file generation. Likely you would need to install any dll you use to the GAC. – Bearcat9425 Nov 11 '15 at 19:37