且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SSIS 读取平面文件跳过第一行

更新时间:2021-10-03 01:54:44

如果要跳过文件名和列名,需要将Header Rows to skip设置为2.你应该还要检查文件是否实际使用换行符 (LF) 而不是 CR+LF.在文本编辑器中检查换行符不足以检测差异,因为大多数编辑器都可以正确显示带有 CR+LFLF 的文件.

If you want to skip the file name and the column names, you need to set Header Rows to skip to 2. You should also check whether the file actually uses line feeds (LF) instead of CR+LF. Checking the line breaks in a text editor isn't enough to detect the difference, as most editors display correctly files with both CR+LF or LF.

您可以通过单击平面文件源中的预览"按钮来检查您的设置结果.如果设置正确,您将看到数据正确对齐的网格.如果不是,你会得到一个错误,或者数据会以某种方式出错,例如非常多的列,第一个数据行中的列名等

You can check the results of your settings by clicking on the "Preview" button in your flat file source. If the settings are correct, you'll see a grid with your data properly aligned. If not, you'll get an error, or the data will be wrong in some way, eg a very large number of columns, column names in the first data row etc