从 Excel 2016 发布到 Power BIPublish to Power BI from Excel 2016

使用 Excel 2016,你可以将 Excel 工作簿直接发布到你的 Power BI 站点,你可以基于工作簿的数据在其中创建高度交互的报表和仪表板。With Excel 2016, you can publish your Excel workbooks right to your Power BI site, where you can create highly interactive reports and dashboards based on your workbook’s data. 然后你可以与组织中的其他人共享你的见解。You can then share your insights with others in your organization.

在继续之前,有几个事项需要记住:Before we go any further, there are few things to keep in mind:

  • 必须先将工作簿保存到 OneDrive for Business,才能发布到 Power BI。Before you can publish to Power BI, your workbook must be saved to OneDrive for Business.
  • 登录到 Office、OneDrive for Business 和 Power BI 所用的帐户必须是同一个帐户。The account you use to sign in to Office, OneDrive for Business, and Power BI must be the same account.
  • 不能发布空工作簿或者不具有任何 Power BI 支持的内容的工作簿。You cannot publish an empty workbook or a workbook that doesn’t have any Power BI supported content.
  • 不能发布加密或受密码保护的工作簿,或具有信息保护管理的工作簿。You cannot publish encrypted or password protected workbooks, or workbooks with Information Protection Management.
  • 发布到 Power BI 需要启用新式验证(默认)。Publishing to Power BI requires modern authentication be enabled (default). 如果禁用,“文件”菜单中将不会出现“发布”选项。If disabled, the Publish option is not available from the File menu.

发布你的 Excel 工作簿To publish your Excel workbook

在 Excel 中,依次选择“文件” > “发布”。In Excel, select File > Publish.

本地文件发布Local file publishing

自 2017 年 2 月更新发布开始,Excel 2016 支持发布本地 Excel 文件。Starting in the February 2017 update, Excel 2016 supports publishing of local Excel files. 不需要将文件保存到 OneDrive for Business 或 SharePoint Online。They do not need to be saved to OneDrive for Business or SharePoint Online.


只有拥有 Office 365 订阅的 Excel 2016 才支持发布本地文件。Only Excel 2016 with an Office 365 subscription will see the experience to publish with local files. Excel 2016 独立安装仍要求将 Excel 工作簿保存到 OneDrive for Business 或 SharePoint Online 才能进行“发布”。Excel 2016 standalone installation will still have the "Publish" only behavior which requires the excel workbook be saved to OneDrive for Business or SharePoint Online.

选择“发布”时,可以选择要将文件发布到哪个工作区。When you select Publish, you will be able to select the workspace you want to publish to. 可以选择有权访问的个人或组工作区。This can be your personal or group workspace that you have access to.

有两个用于将工作簿导入 Power BI 的选项。you’ll get two options on how to get your workbook into Power BI.

发布后,它便会作为副本保存在 Power BI 中(与本地文件分开)。Once published, it is kept as a copy in Power BI, separate from teh local file. 若要更新 Power BI 中的文件,需要重新发布更新后的版本。If you want to update the file in Power BI, you need to publish the updated version again. 可以刷新数据,并能为 Power BI 中的工作簿或数据集设置定期刷新。You can refresh teh data and set scheduled refresh on the workbook or the dataset in Power BI.

从 Excel 独立安装发布Publishing from Excel Standalone

如果你的工作簿尚未保存到 OneDrive,你需要先将其保存到那里。If your workbook isn’t already saved to OneDrive, you’ll need to save it there first. 选择“保存到云”,然后选择 OneDrive for Business 中的一个位置。Select Save to Cloud and choose a location in OneDrive for Business.

将工作簿保存到 OneDrive 后,选择“发布”便会看到两个用于将工作簿导入 Power BI 的选项。Once your workbook is saved to OneDrive, when you select Publish, you’ll get two options on how to get your workbook into Power BI.

将工作簿上传到 Power BIUpload your workbook to Power BI

当你选择此选项时,你的工作簿将显示在 Power BI 中,就像在 Excel Online 中那样。When you choose this option, your workbook will appear in Power BI just like it would in Excel Online. 但与 Excel Online 不同,你会获得一些出色的功能,可帮助你将元素从工作表固定到仪表板。But, unlike Excel Online, you’ll have some great features to help you pin elements from your worksheets to dashboards.

无法编辑在 Power BI 中打开的工作簿,但如果需要进行一些更改,可以选择“编辑”,然后选择是在 Excel Online 中编辑工作簿,还是在计算机上的 Excel 中打开工作簿。You can’t edit your workbook in when open in Power BI, but if you need to make some changes, you can select Edit, and then choose to edit your workbook in Excel Online or open it in Excel on your computer. 你所作的任何更改都会保存到 OneDrive 上的工作簿中。Any changes you make are saved to the workbook on OneDrive.

在上传时,Power BI 中未创建任何数据集。When you upload, no dataset is created in Power BI. 你的工作簿将显示在工作区导航窗格的“报表”中。Your workbook will appear in Reports, in your workspace navigation pane. 上传到 Power BI 的工作簿具有特殊的 Excel 图标,该图标将其标识为已上传的 Excel 工作簿。Workbooks uploaded to Power BI have a special Excel icon, identifying them as Excel workbooks that have been uploaded.

如果你的工作表中仅有数据,或者你想要在 Power BI 中看到数据透视表和图表,请选择此选项。Choose this option if you only have data in worksheets, or you have PivotTables and Charts you want to see in Power BI. 在 Excel 中使用“发布到 Power BI”中的“上载”与在浏览器中使用“获取数据”>“文件”>“OneDrive for Business”>“在 Power BI 中连接、管理和查看 Excel”大致相同。Using Upload from Publish to Power BI in Excel is pretty much the same as using Get Data > File > OneDrive for Business > Connect, Manage and View Excel in Power BI from Power BI in your browser.

将工作簿数据导出到 Power BIExport workbook data to Power BI

当你选择此选项时,表和/或数据模型中任何受支持的数据将导入到 Power BI 中的新数据集中。When you choose this option, any supported data in tables and/or a data model are exported into a new dataset in Power BI. 如果你有任何 Power View 工作表,这些工作表将作为报表在 Power BI 中重新创建。If you have any Power View sheets, those will be re-created in Power BI as reports.

你可以继续编辑工作簿。You can continue editing your workbook. 保存所做的更改后,它们将与 Power BI 中的数据集同步(通常大约在一小时之内)。When your changes are saved, they’ll be synchronized with the dataset in Power BI, usually within about an hour. 如果需要更即时地满足需求,只需再次选择“发布”,而所做的更改便会立即导出。If you need more immediate gratification, you can just select Publish again, and your changes are exported right then and there. 同样,也会更新报表和仪表板中的任何可视化效果。Any visualizations you have in reports and dashboards will be updated, too.

如果你已使用“获取并转换数据”或 Power Pivot 将数据加载到数据模型中,或者如果你的工作簿的 Power View 表中包含你想要在 Power BI 中查看的可视化对象,请选择此选项。Choose this option if you’ve used Get & Transform data or Power Pivot to load data into a data model, or if your workbook has Power View sheets with visualizations you want to see in Power BI.

在 Excel 中使用“发布到 Power BI”中的“导出”与在浏览器中使用“获取数据”>“文件”>“OneDrive for Business”>“将 Excel 数据导出到 Power BI”大致相同。Using Export from Publish to Power BI in Excel is pretty much the same as using Get Data > File > OneDrive for Business > Export Excel data into Power BI from Power BI in your browser.


当你选择任一选项时,Excel 将使用当前帐户登录到 Power BI,然后将你的工作簿发布到 Power BI 站点。When you choose either option, Excel will sign in to Power BI with your current account, and then publish your workbook to your Power BI site. 请密切关注 Excel 中的状态栏。Keep an eye on the status bar in Excel. 它显示了事情的进展状况。It shows how things are going.

完成后,你可以直接从 Excel 转到 Power BI。When complete, you can go to Power BI right from Excel.

后续步骤Next steps

Power BI 中的 Excel 数据Excel data in Power BI
更多问题?More questions? 尝试参与 Power BI 社区Try the Power BI Community