script task exception error

coool sweet 61 Reputation points
2022-02-04T19:33:22.343+00:00

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
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,654 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,451 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Yitzhak Khabinsky 24,936 Reputation points
    2022-02-04T21:49:35.6+00:00

    Hi @coool sweet ,

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

    1 person found this answer helpful.
    0 comments No comments

  2. coool sweet 61 Reputation points
    2022-02-04T23:31:48.207+00:00

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


  3. Olaf Helper 40,656 Reputation points
    2022-02-07T08:26:46.607+00:00

    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.

    0 comments No comments