从表格导入数据到excel文件错误

我正在把数据传输到一个格式化的Excel表Sheet.My目的地在数据stream任务是优秀当我试图执行数据stream任务我越来越低的错误我试图改变设置64位为假。 有人可以帮助我哪里错了。

[Excel Destination [301]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. [Excel Destination [301]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "Excel Destination Input" (312)" failed because error code 0xC020907B occurred, and the error row disposition on "input "Excel Destination Input" (312)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure. [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Excel Destination" (301) failed with error code 0xC0209029 while processing input "Excel Destination Input" (312). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure. 

尝试这个

在DataTable中获取数据,然后使用这个函数

  public void ExportToExcel_AsXlsFile(DataTable dt, string file_name) { var grid = new GridView(); grid.DataSource = dt; grid.DataBind(); Response.ClearContent(); Response.Buffer = true; Response.AddHeader("content-disposition", "attachment; filename='" + file_name + "'.xls"); Response.ContentType = "application/ms-excel"; Response.Charset = ""; StringWriter sw = new StringWriter(); HtmlTextWriter htw = new HtmlTextWriter(sw); grid.RenderControl(htw); Response.Output.Write(sw.ToString()); Response.Flush(); Response.End(); } 

错误原因:

在本地机器上创build软件包并在其中创build连接时,可以select保存该连接的密码。 但是,默认情况下,它将encryption此密码,以便只能在同一台计算机上使用相同的帐户运行软件包时才能解密。 这只有在连接pipe理器使用SQL身份validation或连接到不支持Windows集成身份validation的数据库(例如Oracle)时才有效。 因此,在上述情况下,如果将程序包部署到Remote Sql Server,则会因“无法解密密码”而出现“login失败..”错误。 (注意:如果部署在本地Sql Server中,它运行良好)

解决scheme:要解决问题,您应该select以下三个选项之一:

1.更改包中的所有连接pipe理器以使用Windows身份validation。 注意:与不支持Windows身份validation的第三方数据源(如Oracle)通信时,这不是一个选项。

2.使用“EncryptSensitiveWithPassword”或“EncryptAllWithPassword”对包进行encryption,并且每次用户想要编辑/操作包时提供包密码。

3.创build一个configuration文件,在Package运行时提供连接信息。

参考链接: http : //technet.microsoft.com/en-us/library/ms140213.aspx **