解决在 Power BI Desktop 中导入 Access 和 .XLS 文件出现的问题Resolve issues importing Access and .XLS files in Power BI Desktop

Power BI Desktop 中,Access 数据库和旧版 Excel 工作簿(Excel 2007-2003 类型的 .XLS 文件)均使用 Access 数据库引擎In Power BI Desktop, both Access databases and early versions of Excel workbooks (.XLS files of type Excel 2007-2003) use the Access Database Engine. 有三种常见情形可能会导致 Access 数据库引擎无法正常运行:There are three common situations that can prevent the Access Database Engine from working properly:

情况 1:未安装 Access 数据库引擎Situation 1: No Access Database Engine Installed

当 Power BI Desktop 错误消息指示未安装 Access 数据库引擎时,必须安装与你的 Power BI Desktop 版本匹配的 Access 数据库引擎版本(32 位或 64 位)。When the Power BI Desktop error message indicates the Access Database Engine in not installed, you must install the Access Database Engine version, either 32-bit or 64-bit, that matches your Power BI Desktop version. 你可以从此位置安装 Access 数据库引擎。You can install the Access Database Engine from this location.

备注

如果安装的 Access 数据库引擎位版本不同于 Microsoft Office 安装的位版本,则 Office 应用程序将不能使用 Access 数据库引擎。If the installed Access Database Engine bit version is different from your Microsoft Office installation's bit version, Office applications will not be able to use the Access Database Engine.

情况 2:Access 数据库引擎位版本(32 位或 64 位)不同于你的 Power BI Desktop 位版本Situation 2: The Access Database Engine bit version (32-bit or 64-bit) is different from your Power BI Desktop bit version

当安装的 Microsoft Office 版本为 32 位,而安装的 Power BI Desktop 版本为 64 位时,通常会发生这种情况。This situation often occurs when the installed version of Microsoft Office is 32-bit, and the version of Power BI Desktop installed is 64-bit. 相反的情况也会发生,无论属于上述哪种情况,都是位版本不一致(如果使用的是 Office 365 订阅,请参阅情形 3 了解不同的问题和解决方法)。The opposite can occur as well, and the bit-version mismatch with occur in either case (if you're using an Office 365 subscription, see Situation 3 for a different issue and resolution). 以下任何一种解决方案都可以修复此位版本不一致错误:Any of the following solutions can remedy this bit-version mismatch error:

  1. 更改 Power BI Desktop 的版本以匹配 Microsoft Office 安装的位版本。Change the version of Power BI Desktop to match the bit-version of your Microsoft Office installation. 若要更改 Power BI Desktop 的位版本,请卸载 Power BI Desktop,然后安装与 Office 安装匹配的 Power BI Desktop 版本。To change the bit-version of Power BI Desktop, uninstall Power BI Desktop, and then install the version of Power BI Desktop that matches your Office installation. 若要选择 Power BI Desktop 的版本,请在桌面下载页上选择高级下载选项To select a version of Power BI Desktop, on the download page for desktop select Advanced download options.

    在出现的下载页上选择你的语言,然后选择下载按钮。On the download page that appears, choose your language and then select the Download button. 在出现的屏幕上,选择 PBIDesktop.msi 旁边的复选框以选择 32 位版本,或 PBIDesktop_x64.msi 旁边的复选框以选择 64 位版本。ON the screen that appears, select the checkbox beside PBIDesktop.msi for the 32-bit version, or PBIDesktop_x64.msi for the 64-bit version. 在下面的屏幕中,选择了 64 位版本。In the following screen, the 64-bit version is selected.

    备注

    使用 Power BI Desktop 的 32 位版本时,如果创建非常大的数据模型,可能会遇到内存不足的问题。When using the 32-bit version of Power BI Desktop, when creating very large data models you might experience out-of-memory issues.

  2. 更改 Microsoft Office 的版本以匹配 Power BI Desktop 安装的位版本。Change the version of Microsoft Office to match the bit-version of your Power BI Desktop installation. 若要更改 Microsoft Office 的位版本,请卸载 Office,然后安装与 Power BI Desktop 安装匹配的 Office 版本。To change the bit-version of Microsoft Office, uninstall Office, and then install the version of Office that matches your Power BI Desktop installation.
  3. 如果试图打开 .XLS 文件(Excel 2007-2003 工作簿)时出错,可以通过在 Excel 中打开 .XLS 文件并将其另存为 XLSX 文件,来避免使用 Access 数据库引擎。If the error occurred when attempting to open an .XLS file (an Excel 2007-2003 workbook), you can avoid using the Access Database Engine by opening the .XLS file in Excel, and saving it as an XLSX file.
  4. 如果前三种解决方案不可行,则可安装 Access 数据库引擎的两个版本,但这不是建议的解决方法。If the previous three solutions are not feasible, it is possible to install both versions of the Access Database Engine, but this is not a recommended workaround. 安装两个版本将解决 Power Query for Excel 和 Power BI Desktop 的这一问题,但将对自动(默认)使用最先安装的 Access 数据库引擎的位版本的任何应用程序引入错误和问题。Installing both versions will resolve this issue for Power Query for Excel and Power BI Desktop, but will introduce errors and issues for any application that automatically (by default) uses the bit-version of the Access Database Engine that was installed first. 若要安装 Access 数据库引擎的两个位版本,请下载两个版本,然后使用被动开关分别运行它们。To install both bit-versions of the Access Database Engine, download both versions, then run each of them using the /passive switch. 例如:For example:

    c:\users\joe\downloads\AccessDatabaseEngine.exe /passive
    
    c:\users\joe\downloads\AccessDatabaseEngine_x64.exe /passive
    

情形 3:无法结合使用 Office 365 订阅和 Access 或 .XLS 文件Situation 3: Trouble using Access or .XLS files with an Office 365 subscription

如果使用的是 Office 365 订阅,无论是 Office 2013 还是 Office 2016,Access 数据库引擎提供程序是在供 Office 进程访问的虚拟注册表位置中进行注册。If you are using an Office 365 subscription, whether Office 2013 or Office 2016, the Access Database Engine provider is registered in a virtual registry location that is only accessible to Office processes. 因此,非 Office 进程的 Mashup 引擎(负责运行非 Office 365 Excel 和 Power BI Desktop)无法使用 Access 数据库引擎提供程序。As a result, the Mashup Engine (which is responsible for running non-Office 365 Excel and Power BI Desktop) which is not an Office process, cannot use the Access Database Engine provider.

若要纠正这种情形,可以下载并安装与 Power BI Desktop 安装位版本匹配的 Access 数据库引擎可再发行组件(请参阅前面的部分,了解有关位版本的详细信息)。To remedy this situation, you can download and install the Access Database Engine redistributable that matches the bit version of your Power BI Desktop installation (see earlier sections for more information about bit-versions).

下载链接:下载 Access 数据库引擎Download link: Access Database Engine download.

导致导入问题发生的其他情形Other situations that cause import issues

我们会尽可能地收录 Access 或 .XLS 文件出现的问题。We strive to cover as many issues that occur with Access or .XLS files as possible. 如果遇到本文未收录的问题,请将问题提交给 Power BI 支持团队If you encounter an issue that isn't covered in this article, please submit a question about the issue to Power BI Support. 我们会定期查看可能会对大量客户造成影响的问题,并将其收录到我们的文章中。We regularly look at issues that may be affecting many customers, and include them in our articles.