SolvedPrivate

Querying EXCEL  using  Excel Source Data Flow Task in SSIS 2008

Posted on 2013-01-11
2
44 Views
Last Modified: 2016-02-10
Hi,
I am using an excel source data flow task in SSIS to load specific tabs from spreadsheets into a database.
This works fine as long as the tab exists, as shown using the Preview option below.
if-exists-1.bmp
However there are situations where the tab may not exist and then I want to perform another action.
I am trying to incorporate an IF EXISTS  statement into my query but am  having issues with this, see below
if-exists-2.bmp
any guidance appreciated, thanks
0
Comment
Question by:blossompark
2 Comments
 
LVL 37

Accepted Solution

by:
ValentinoV earned 500 total points
ID: 38766918
Unless there's a metadata table which can be queried (such as sys.tables in a SQL Server DB), I really doubt that you can get this to work by just using that Excel Source.  You'll probably have to use some additional components such as a Script Component.

Or, another option is using the Foreach Loop Container with the Foreach ADO.NET Schema Rowset enumerator to loop over the sheets.

Have a look at this MSDN page for the steps to follow: How to: Loop through Excel Files and Tables by Using a Foreach Loop Container

The chapter you'll be interested in starts halfway down the page.
0
 

Author Closing Comment

by:blossompark
ID: 38767090
Hi ValentinoV,
Thanks for your input.
Yes I think I will have to go down the direction you have pointed to. thanks again
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
I have a large data set and a SSIS package. How can I load this file in multi threading?
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

813 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now