?
SolvedPrivate

Querying EXCEL  using  Excel Source Data Flow Task in SSIS 2008

Posted on 2013-01-11
2
Medium Priority
?
48 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 2000 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

Quick Start: DOCKER

Sometimes you just need a Quick Start on a topic in order to begin using it.. this is just what you need to know to get up and running with Docker!

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

765 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