Solved

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

Posted on 2014-10-15
4
142 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

896 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

11 Experts available now in Live!

Get 1:1 Help Now