SSIS-导入Excel文件时记录行号
SSIS导入Excel时记录行号
1. "Excel源"后添加"脚本组件"
2. "脚本组件"中新增输出列,命名为"RowNumber"
3. "脚本组件"中编辑脚本.
4. 脚本如下.
private
int m_rowNumber;
m_rowNumber++;
Row.RowNumber = m_rowNumber;
5. 下一步的输入列中显示RowNumber
6. 结果.
参考链接:
2. https://www.hansmichiels.com/2015/11/13/how-to-add-a-rownumber-to-a-data-flow-task-in-ssis-2012/