?
Solved

Import multiple worksheets (tabs) from one excel OR multiple excel files using SSIS

Posted on 2014-10-15
4
Medium Priority
?
148 Views
Last Modified: 2016-02-11
Dear Folks,

In SSIS, in case I've an excel/multiple excel files and I want to import all worksheets OR tabs from each excel file in SQL Server.
Do you have any idea best way to do that?

Best Regards,
Mohit Pandit
0
Comment
Question by:MohitPandit
[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
  • 3
4 Comments
 
LVL 66

Expert Comment

by:Jim Horn
ID: 40384461
<Wild guess based on a fuzzy memory of doing this in a past project>
Eyeball the Excel connection to see if you can name a named range, and if yes enter a tab name and run, and see if SSIS will process the data in that tab.

If successful, you should be able to copy-paste that connection to create more, then edit the named range to reflect that tab whose data you're trying to import.
0
 
LVL 5

Author Comment

by:MohitPandit
ID: 40408407
I've resolved it. I'll share the steps.
0
 
LVL 5

Accepted Solution

by:
MohitPandit earned 0 total points
ID: 40582285
Please find below steps through which I've resolved it.

1. First, For each Loop (Enumerator: Foreach File Enumerator)
      -- Folder path (in Collection)
      -- file extension .xlsx (in Collection)
      -- Store in variable in variable mapping
2. Second, Next another For each loop editor (with in First point)
      -- (Enumerator: Foreach ADO.NET Schema Rowset Enumerator)
      -- Store in variable (sheet name) in Variable mapping
3. Third, Data Flow Task (with in second point)
      -- Source as excel
            -- Select variable name (i.e. sheet name) in "OpenRowSetVariable" property

Best Regards,
Mohit Pandit
0
 
LVL 5

Author Closing Comment

by:MohitPandit
ID: 40593207
It is done myself.
Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

771 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