SolvedPrivate

Querying EXCEL  using  Excel Source Data Flow Task in SSIS 2008

Posted on 2013-01-11
2
46 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
[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
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

726 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