首页 > 解决方案 > MSBI Merge:如何将 Excel 文件与 SSIS 中的测试文件合并?

问题描述

如何将 Excel 文件与 SSIS 中的测试文件合并?

我试图在 SSIS 中使用 Merge 将 Excel 文件与文本文件合并,但它抛出错误为[Flat File Source [41]] Error: Data conversion failed. “标题”列的数据转换返回状态值 4 和状态文本Text was truncated or one or more characters had no match in the target code page.

标签: excelcsvmerge

解决方案


通过单击 Advance 并选择每一列,只需从 Flat File Connection Manager Editor 将 OutputColumn 大小设置为 255。例如,我有四列 Name、Title、Company 和 Location。对于这些列,首先我将数据类型更改为 Unicode 字符串 [DT_WSTR],因为 txt 文件具有字符串 [DT_STR],因为 Excel 文件具有 Unicode 数据类型。此外,将 OutputColumn 大小设置为 255。


推荐阅读