question

cooolsweet-5113 avatar image
0 Votes"
cooolsweet-5113 asked OlafHelper-2800 answered

script task exception error

hi

i am using script task to changed sheet name in excel file.

its working fine in my local machine

i am adding following reference in my task.

using Microsoft.Office.Interpro.Excel
using System.Collections.Generic



i did check with DBA , above assembly is not installed on server. also there is no MS EXCEL installed on server.

i am getting error when i schedule job on server . its throwing exception error.

what need to install on server .

anyone knows



sql-server-generalsql-server-integration-services
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


I do not think that it will work without Excel; it is not enough to have the Interop assemblies. In addition, if the job works as a service, then check these cautions too: https://support.microsoft.com/en-us/topic/considerations-for-server-side-automation-of-office-48bcfe93-8a89-47f1-0bce-017433ad79e2.

Maybe there are some other kinds of jobs or libraries that do not require the presence of Excel application to modify Excel files.


0 Votes 0 ·

Hi @cooolsweet-5113, thank you for your post. Did below answers help you? If yes, could you please do "Accept Answer"? If no, could you please provide the original error message?

0 Votes 0 ·
YitzhakKhabinsky-0887 avatar image
1 Vote"
YitzhakKhabinsky-0887 answered YitzhakKhabinsky-0887 edited

Hi @cooolsweet-5113,

You need to download the following assembly: Microsoft.Office.Interop.Excel.dll
Download link: microsoft.office.interop.excel-dll


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

cooolsweet-5113 avatar image
0 Votes"
cooolsweet-5113 answered YitzhakKhabinsky-0887 commented

you mean download on server where sql agent job runs.
can you tell me which location it should be placed.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@cooolsweet-5113,

It shall be on the server where you have SSIS run-time environment with SSIS Catalog.
File system location is irrelevant because that assembly needs to be registered in the Global Assembly Cache - GAC.
,

0 Votes 0 ·
OlafHelper-2800 avatar image
0 Votes"
OlafHelper-2800 answered

above assembly is not installed on server. also there is no MS EXCEL installed on server.

Then you don't get it working.
The .NET InterOp is a COM wrapper, with utilize the COM interface of Excel, so Excel & the InterOp are mandatory.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.