Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import multiple Excel files into SQL Server 2008 R2 using SSIS Packages?

I have to insert data into two tables from two different excel sheets using SSIS packges.

So, please some one tell me How to import multiple Excel files into SQL Server 2008 R2 using SSIS Packages?

like image 283
Guru Avatar asked Nov 05 '22 01:11

Guru


2 Answers

since you have only 2 excel files and only two tables I don't see why use a foreach loop. Just follow this link and do it directly

If you need to insert from both excel files to both databases you can use a multicast component to create a copy of a dataset

like image 104
Diego Avatar answered Nov 09 '22 10:11

Diego


Use Foreach Loop Container --> Foreach File Enumerator. Then put your Data Flow in Foreach Loop Container. Table structure and sheet name have to be equal in every Excel file.

Here is nice tutorial: http://bi-polar23.blogspot.com/2007/08/loading-multiple-excel-files-with-ssis.html

like image 27
devarc Avatar answered Nov 09 '22 10:11

devarc