简体   繁体   English

导出到Excel SSIS包中的数据转换错误

[英]Data conversion errors in export to Excel SSIS package

Building a package to pull data from SQL Server view and load it into an excel file. 构建一个程序包以从SQL Server视图中提取数据并将其加载到excel文件中。 Getting a generic error (Multiple-step OLE DB operation generated errors... No work was done. Apparently this is usually from data type mis-matches. I am looking over the mapping in the Data Conversion task, but I don't see anything wrong. When I tried creating this in the Data Export wizard in SQL Server, I was getting truncation errors. 遇到一般性错误(多步OLE DB操作生成错误...未完成。显然,这通常是由于数据类型不匹配造成的。我正在查看“数据转换”任务中的映射,但未看到当我尝试在SQL Server的“数据导出”向导中创建此错误时,出现了截断错误。

I have heard that I can use the "Derived Columns' task to fix the conversion failures, but I need to identify which columns are having trouble. How do I pinpoint the exact problem columns? 我听说我可以使用“派生列”任务来修复转换失败,但我需要确定哪些列有问题。如何确定确切的问题列?

EDIT - Using BIDS 2008, exporting to an excel destination. 编辑-使用BIDS 2008,导出到excel目标。 I first tried with the import/export wizard in SSMS but kept failing, so I am now trying to do it in SSIS/BIDS. 我首先尝试使用SSMS中的导入/导出向导,但一直失败,因此现在尝试在SSIS / BIDS中执行此操作。

I am currently getting the 0x80040E37 when I try to open the mapping tab in the Destination task. 当我尝试在“目标”任务中打开“映射”选项卡时,当前正在获取0x80040E37。 Apparently the fixes are to set to 32 bit or fix the mappings. 显然,修复程序将设置为32位或修复映射。 I am running in 32 bit and I can't fix the mappings because the tab wont open because of this error. 我运行的是32位,并且无法修复映射,因为此错误导致选项卡无法打开。

The problem was Excel 2007 has a 255 length limit on fields. 问题是Excel 2007在字段上的长度限制为255。 Two choices are to either switch your destination file type to 97-2003, or add a derived column task to truncate (substring) the field, which looses data. 两种选择是将目标文件类型切换为97-2003,或者添加派生的列任务以截断(子字符串)该字段,从而丢失数据。 There is probably another option having to do with error handling and dumping the row off to a flat file or something. 可能还有另一种选择与错误处理和将行转储到平面文件等有关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM