简体   繁体   English

Excel 连接管理器通过 SSIS VS19 连接失败

[英]Excel Connection Manager Failed to Connect via SSIS VS19

New to the SSIS world and I got it working before on Excel Version 2016 & Version 2007-2010 [after ages of troubleshooting] but then it just stopped working [endless testing on various solutions I've read, seems to be a reoccurring issue] and now it continues to not work.... any assistance would be appreciated. SSIS 世界的新手,我之前在 Excel 版本 2016 和版本 2007-2010 [经过多年的故障排除]但它只是停止工作[对我读过的各种解决方案进行无休止的测试,似乎是一个反复出现的问题]现在它仍然无法正常工作....任何帮助将不胜感激。

Here's the situation: Importing Excel to the SSIS environment via VS19.情况如下:通过VS19将Excel导入SSIS环境。 when I try to view the Table in the Excel Source Editor, it comes up with the following error message:当我尝试在 Excel 源代码编辑器中查看表格时,会出现以下错误消息:

Could not retrieve the table information for the connection manager 'Excel Connection Manager'.无法检索连接管理器“Excel 连接管理器”的表信息。 Failed to connect to the source using the connection manager 'Excel Connection Manager'.无法使用连接管理器“Excel 连接管理器”连接到源。

  • Using Visual Studio Community 2019 - 16.6.30128.74使用 Visual Studio 社区 2019 - 16.6.30128.74
  • Using a 32-bit Excel from Microsoft Suite for Microsoft 365 on Windows 10 - 16.0.11929.20776在 Windows 10 - 16.0.11929.20776 上使用来自 Microsoft Suite for Microsoft 365 的 32 位 Excel
  • In Visual Studio Installer, I have activated the "Data storage and processing" tile with the "SQL Server Data Tools" ticked在 Visual Studio 安装程序中,我激活了“数据存储和处理”磁贴,并勾选了“SQL Server 数据工具”
  • I am running the package in 32-bit mode我在 32 位模式下运行 package

    Project properties >> Debugging >> Run64BitRuntime = False

  • I have installed both AcccessDatabaseEngine 32bit and 64bit for 2010 & 2016 on my computer -- x64 2010 redistributable - 14.0.7015.1000 -- x32 2010 redistributable - 14.0.7015.1000 -- x64 2016 redistributable - 16.0.4519.1000 -- x32 2016 redistributable - 16.0.4519.1000我已经在我的计算机上安装了 2010 和 2016 的 32 位和 64 位 AcccessDatabaseEngine - x64 2010 可再发行 - 14.0.7015.1000 - x32 2010 可再发行 - 14.0.7015.1000 - x64 2016 可再发行 - 16.0.4519.1000 - x 16.019.1000 - x 4519.1000

  • Have even done the Passive/Quiet model installation steps甚至完成了被动/静音 model 安装步骤

    1. Open the Command Prompt by typing cmd in the Windows search box under the Start menu and selecting cmd.exe通过在开始菜单下的 Windows 搜索框中键入cmd并选择cmd.exe打开命令提示符
    2. Type the file path and file name of the [relevant] install file, followed by a space and /passive or /quiet [if passive didn't work] .键入 [relevant] 安装文件的文件路径和文件名,后跟空格和/passive/quiet [如果被动不起作用]
    3. Open the Registry Editor by typing regedit in the Windows search box under the Start menu and selecting regedit.exe通过在开始菜单下的 Windows 搜索框中键入regedit并选择regedit.exe打开注册表编辑器
    4. Deleted the mso.dll registry value in the following registry key:删除了以下注册表项中的 mso.dll 注册表值:

"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Common\FilesPaths"

[above for 2010] and [below for 2016] [高于 2010 年][低于 2016 年]

"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\16.0\Common\FilesPaths"

  • I've tried uninstalling and reinstalling the SSDT我已经尝试卸载并重新安装 SSDT
  • I've tried using all available excel version options [2007-2010, 2013, 2016] in the Excel Source Editor to no avail我已经尝试在 Excel 源代码编辑器中使用所有可用的 excel 版本选项[2007-2010, 2013, 2016]无济于事
  • I've even tried the DelayValidation method someone suggested [still didn't work]我什至尝试过有人建议的 DelayValidation 方法[仍然没有用]

    Project Task >> Properties >> DelayValidation = True

  • Even checked my connection string on my Excel Connection Manager甚至在我的 Excel 连接管理器上检查了我的连接字符串

    Excel Connection Manager Connection >> Properties >> ConnectionString >> Provider=Microsoft.ACE.OLEDB.12.0

  • Ran a repair on both my VS19 and my Office对我的 VS19 和我的 Office 进行了维修

  • Made sure that all my excel files were closed确保我所有的 excel 文件都已关闭

Current workaround: I've had to save all my excel files to a.xls versions and change the config to 97-2003 in order for my SSIS to register the tables from the workbook.当前解决方法:我必须将所有 excel 文件保存为 a.xls 版本并将配置更改为 97-2003,以便我的 SSIS 注册工作簿中的表。 What am I doing wrong?我究竟做错了什么? Am I missing something?我错过了什么吗? It was working before and now it's C#$% itself.它以前可以工作,现在它本身就是 C#$%。

Can someone please suggest another solution of why I can't use my excel 2010, 2013 or 2016 version to import my Excel Source to my SSIS environment in VS19 please.有人可以建议另一种解决方案,说明为什么我不能使用我的 excel 2010、2013 或 2016 版本将我的 Excel 源导入我的 ZD941BD232618B67D03D8BA96VSF83CC2 环境中。 Thank you.谢谢你。

So, I basically had to start from scratch.所以,我基本上不得不从头开始。 Wipe my laptop and reinstall everything.擦拭我的笔记本电脑并重新安装所有内容。 SSMS, VS all the add-ons, everything. SSMS,VS 所有的附加组件,一切。 Now it works perfectly, so I think it's either the sequence that I've downloaded things or something that was already in my laptop was stopping the applications from working properly.现在它工作得很好,所以我认为要么是我下载东西的顺序,要么是我笔记本电脑中已经存在的东西阻止了应用程序正常工作。 Gosh that was a nightmare.天哪,那真是一场噩梦。 But my problem is now fixed.但是我的问题现在已经解决了。

From what I've seen, the problem develops almost immediately after installing Office 365. Verify you are, in fact, using 32-bit Office 365. All indications that I have encountered, Office 365 is 64-bit and the installation process REMOVES the 32-bit prior versions of Office products.据我所见,安装 Office 365 后问题几乎立即出现。确认您实际上使用的是 32 位 Office 365。我遇到的所有迹象表明,Office 365 是 64 位,安装过程删除了32 位早期版本的 Office 产品。 And that's where the problems start.这就是问题开始的地方。

Installing the AccessDatabaseEngine is a junkyard patch to put a 32-bit dll back into your system for Visual Studio to use when you run in 32-bit mode.安装 AccessDatabaseEngine 是一个垃圾场补丁,用于将 32 位 dll 放回系统中,以便 Visual Studio 在 32 位模式下运行时使用。 It's imperfect and may not give you all the required 32-bit dlls that the newer versions of Visual Studio require, which is why results can be flaky.它并不完美,可能无法为您提供较新版本的 Visual Studio 所需的所有 32 位 dll,这就是结果可能不稳定的原因。

The core of the problem is actually Visual Studio.问题的核心其实是Visual Studio。 The development environment EXE, even in VS 2019, is still 32-bit.开发环境 EXE,即使在 VS 2019 中,仍然是 32 位的。 Thus, when you hit F5 to run your app, the Dev Env EXE forces all dlls to use 32-bit versions.因此,当您按 F5 运行您的应用程序时,Dev Env EXE 会强制所有 dll 使用 32 位版本。 And Office 365 has forcibly removed the Excel 32-bit dlls during installation, which is why so many people do the junkyard patch (above).而且Office 365在安装过程中强行删除了Excel 32位dll,这也是为什么这么多人做垃圾场补丁的原因(上图)。

If there were some way to force VS to use a 64-bit dev env EXE, then all these problems go away.如果有某种方法可以强制 VS 使用 64 位开发环境 EXE,那么所有这些问题 go 都会消失。 But until then, you are stuck with setting all flags to use 64-bit (so you can read the most recent Excel files), deploying your code to a server that has the 64-bit dlls, then using hope-and-pray methods.但在那之前,您必须将所有标志设置为使用 64 位(这样您就可以读取最新的 Excel 文件),将代码部署到具有 64 位 dll 的服务器上,然后使用希望与祈祷的方法. You will be working mostly blind, but you should be able to get some results.您将大部分时间盲目工作,但您应该能够获得一些结果。

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

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