使用SSIS包将多个Excel文件导入SQL Server 2008 R2 ?

时间:2023-01-05 19:57:54

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

我必须使用SSIS packges从两个不同的excel表中插入数据到两个表中。

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

那么,请告诉我如何使用SSIS包将多个Excel文件导入SQL Server 2008 R2 ?

2 个解决方案

#1


0  

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

由于您只有两个excel文件和两个表,我不明白为什么要使用foreach循环。只要遵循这个链接,直接做就行了。

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

如果需要从两个excel文件插入到两个数据库,可以使用多播组件创建数据集的副本

#2


1  

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.

使用Foreach循环容器——每个文件枚举器的>。然后将数据流放到Foreach循环容器中。每个Excel文件中的表结构和表名必须相等。

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

这里有一个很好的教程:http://bi- polar23.blogspot.com/2007/08/loadingmultiexcel -with-ssis.html。

#1


0  

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

由于您只有两个excel文件和两个表,我不明白为什么要使用foreach循环。只要遵循这个链接,直接做就行了。

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

如果需要从两个excel文件插入到两个数据库,可以使用多播组件创建数据集的副本

#2


1  

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.

使用Foreach循环容器——每个文件枚举器的>。然后将数据流放到Foreach循环容器中。每个Excel文件中的表结构和表名必须相等。

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

这里有一个很好的教程:http://bi- polar23.blogspot.com/2007/08/loadingmultiexcel -with-ssis.html。