Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SSIS (SQL server agent job) Script Task Error - Cannot create ActiveX component

Posted on 2010-09-21
1
Medium Priority
?
1,584 Views
Last Modified: 2013-11-10
I am running an SSIS package through a SQL server agent job and get this error:
"Source: <my excel macro script task>  Description: The script threw an exception: Cannot create ActiveX component."

When I run this package manually through the solution it runs properly, it's when the SQL server agent job tries to run it that it generates this error.

This package contains a simple script task that calls 2 excel macros in order to modify the source file before importing. This is the only way that I could think of to import a file with dynamic columns (running the macros to modify the column headers and other formatting functions).

Here's my script task sub routine code:

Dim xlapp As Object, wb As Object

xlapp = CreateObject("Excel.Application")
xlapp.visible = True

wb = xlapp.Workbooks.Open(<source file>.xls)

wb.application.Run(<macro1>)
wb.application.Run(<macro2>)

wb.Save()
wb.Close()
xlapp.Quit()

wb = Nothing

Simple, right? I just don't know where I'm going wrong. Any ideas?
As stated above, the error in the SS agent job is pointing to this particular script task.

Thanks,
Katie
0
Comment
Question by:DixieDev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
DixieDev earned 0 total points
ID: 33728569
Excel isn't installed on the server where this package is running through the SS agent.
Oops! Problem solved. :o)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question