Solved

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

Posted on 2014-10-15
4
139 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
  • 3
4 Comments
 
LVL 65

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

757 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