简体   繁体   English

使用SSIS 2012将数据从Sql Server 2014导出到Excel文件

[英]Exporting Data to Excel file From Sql Server 2014 using SSIS 2012

I am using windows 8.1, office 2013, Visual Studio 2013, SQL Server 2014 and SSIS 12.0 我正在使用Windows 8.1,Office 2013,Visual Studio 2013,SQL Server 2014和SSIS 12.0

I have a data flow which has OLE DB source, Data Conversion And Excel Destination. 我有一个包含OLE DB源,数据转换和Excel目标的数据流。 My OLEDB Source 我的OLEDB来源
在此处输入图片说明 Data Conversion 资料转换 在此处输入图片说明 I have create a Excel file StudentInfo.xls in (C:\\XX) folder and make a connection 我在(C:\\ XX)文件夹中创建了一个Excel文件StudentInfo.xls并建立了连接 在此处输入图片说明

Everything is OK, but when I execute it I giving me the following errors: 一切都很好,但是当我执行它时,出现以下错误:

Error: 0xC0209303 at DynamicExcel, Connection manager "Excel Connection Manager": The requested OLE DB provider Microsoft.Jet.OLEDB.4.0 is not registered. 错误:DynamicExcel的0xC0209303,连接管理器“ Excel连接管理器”:所请求的OLE DB提供程序Microsoft.Jet.OLEDB.4.0未注册。 If the 64-bit driver is not installed, run the package in 32-bit mode. 如果未安装64位驱动程序,请以32位模式运行程序包。 Error code: 0x00000000. 错误代码:0x00000000。 An OLE DB record is available. OLE DB记录可用。 Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered". 源:“ Microsoft OLE DB服务组件”结果:0x80040154说明:“类未注册”。

Error: 0xC020801C at Data Flow Task, Excel Destination [24]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. 错误:数据流任务处的0xC020801C,Excel目标[24]:SSIS错误代码DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER。 The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0209303. 对连接管理器“ Excel Connection Manager”的AcquireConnection方法调用失败,错误代码为0xC0209303。 There may be error messages posted before this with more information on why the AcquireConnection method call failed. 在此之前可能会发布错误消息,并提供有关AcquireConnection方法调用失败原因的更多信息。

This link ( Switch package from 64bit to 32bit ) led me to change the Run64BitRuntime property to False . 这个链接( 从64位到32位的切换程序包 )使我将Run64BitRuntime属性更改为False

After changing the property, I am now getting a different set of errors: 更改属性后,我现在遇到了另一组错误:

Error: 0xC0202009 at DynamicExcel, Connection manager "Excel Connection Manager": SSIS Error Code DTS_E_OLEDBERROR. 错误:DynamicExcel的0xC0202009,连接管理器“ Excel连接管理器”:SSIS错误代码DTS_E_OLEDBERROR。 An OLE DB error has occurred. 发生OLE DB错误。 Error code: 0x80004005. 错误代码:0x80004005。 An OLE DB record is available. OLE DB记录可用。 Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "The Microsoft Jet database engine cannot open the file ''. It is already opened exclusively by another user, or you need permission to view its data.". 来源:“ Microsoft JET数据库引擎”结果:0x80004005描述:“ Microsoft Jet数据库引擎无法打开文件”。该文件已经由另一用户以独占方式打开,或者您需要获得查看其数据的权限。”

Error: 0xC020801C at Data Flow Task, Excel Destination [24]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. 错误:数据流任务处的0xC020801C,Excel目标[24]:SSIS错误代码DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER。 The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. 对连接管理器“ Excel Connection Manager”的AcquireConnection方法调用失败,错误代码为0xC0202009。 There may be error messages posted before this with more information on why the AcquireConnection method call failed. 在此之前可能会发布错误消息,并提供有关AcquireConnection方法调用失败原因的更多信息。

I've the same message, I have an SSIS project on visual studio 2010, I read a file.xls on that page, in my project VS 2010 has not any problem when I tried to store some query results to excel file, throw me a 'Microsoft.Jet.OLEDB.4.0' the provider is not registered on the local machine', I fixed that problem next following this steps, 我有相同的消息,我在Visual Studio 2010上有一个SSIS项目,我在该页面上读取了一个file.xls,在我的项目VS 2010中,当我尝试将一些查询结果存储到excel文件时没有任何问题,扔给我“ Microsoft.Jet.OLEDB.4.0”提供程序未在本地计算机上注册”,我按照以下步骤修复了该问题,

1.-Open IIS 1.-打开IIS

2.-Change the appPool on Advanced Settings 2.-在高级设置上更改appPool

3.-true to enable to 32-bit application. 3.-true启用32位应用程序。

and that's all 就这样

ps.I changed Configuration Manager to X86 on Active Solution Platform ps.I在Active Solution Platform上将Configuration Manager更改为X86

I had the same issue. 我遇到过同样的问题。 How I resolved it was: 我如何解决的是:

  1. Open SSIS 打开SSIS
  2. Go to DEBUG 转到调试
  3. Click and open My Project Properties 单击并打开我的项目属性
  4. Go under Configuration Properties/Debugging 转到配置属性/调试下
  5. Select False under Run64BitRuntime. 在Run64BitRuntime下选择False。
  6. Apply the changes 套用变更

After I did this I was able to run the packages without any errors. 完成此操作后,我可以无任何错误地运行软件包。

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

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