同个Excel文件中多个Sheet中的数据导入到单张表中,参考了文章:http://www.cnblogs.com/biwork/p/3478778.html
思路:
1) ForEach Loop组件获得Excel文件中的各个Sheet的名字,然后复制给variable
2) Loop里层的Data Flow再读取variable的值来加载数据
需要注意的点:
1) 一般新建一个Excel文件会默认生成3个Sheet,如果你滞留了某个空的Sheet在里面,就会报错
[SSIS.Pipeline] Error: "OLE DB Source" failed validation and returned validation status "VS_NEEDSNEWMETADATA".
2)每个Sheet的字段头部必须都一样,不然加载过程中会报错说没有绑定某个栏位
[OLE DB Source [37]] Warning: The external columns for OLE DB Source are out of synchronization with the data source columns. The column "First_Name_aaa" needs to be added to the external columns.
The column "Last_Name_bbb" needs to be added to the external columns.
时间: 2024-11-06 11:06:16