Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SSIS  - loading different version of excel files

Posted on 2013-11-08
3
Medium Priority
?
902 Views
Last Modified: 2016-09-05
Hello Experts,
I am using SQL Server 2008 - SSIS to load excel files to database.

SSIS excel connection manager, lets you specify which type of excel file, you will be connecting to either xls or xlsx, you can not use one connection manager for both types, this  only allows the user to always change an xlsx file to xls, then process it,

Is there a way to dynamically change the connection manager, based on the type of excel file, or should i just have two different SSIS packages called, when a different type is processed.

Say i have 2 files - test.xls   and test.xlsx ---  i want to process both files without changing excel connection manager info in SSIS.

Any Idea?

Thanks
0
Comment
Question by:mani_sai
3 Comments
 
LVL 32

Accepted Solution

by:
Brendt Hess earned 2000 total points
ID: 39634819
Your best method to handle this might be a conditional fork.  If it is an XLS file, go down this path - if an XLSX file, go down this other path.

Assuming that the entire package does not require the Excel file connection in every step, this would reduce code duplication and the chance that you fix a bug in one package, but not the other.
0
 
LVL 8

Author Closing Comment

by:mani_sai
ID: 39638894
Thanks
1
 

Expert Comment

by:Himanshi Joshi
ID: 41785640
whatever is the file extension .xls or .xlsx always select excel version -windows 2007 . It will definitely work with both xls and xlsx file. :)
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

963 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