错误: 我们在你的 Excel 工作簿中找不到任何数据Error: We couldn't find any data in your Excel workbook

备注

本文适用于 Excel 2007 及更高版本。This article applies to Excel 2007 and later.

将 Excel 工作簿导入 Power BI 时,你可能会看到以下错误:When you import an Excel workbook into Power BI, you may see the following error:

错误: 我们在你的 Excel 工作簿中找不到任何数据。你的数据可能格式不正确。你需要在 Excel 中编辑工作簿,然后再次导入它。Error: We couldn't find any data in your Excel workbook. Your data might not be formatted properly. You'll need to edit your workbook in Excel and then import it again.

快速解决方案Quick solution

  1. 在 Excel 中编辑工作簿。Edit your workbook in Excel.
  2. 选择包含你的数据的单元格范围。Select the range of cells that contain your data. 第一行应包含列标题(列名)。The first row should contain your column headers (the column names).
  3. Ctrl + T 可创建表。Press Ctrl + T to create a table.
  4. 保存工作簿。Save your workbook.
  5. 返回到 Power BI 并再次导入工作簿,如果你在 Excel 2016 中工作并且已将工作簿保存到 OneDrive for Business,请在 Excel 中,单击“文件”>“发布”。Return to Power BI and import your workbook again, or if you're working in Excel 2016 and you've saved your workbook to OneDrive for Business, in Excel, click File > Publish.

详细信息Details

原因Cause

在 Excel 中,可以通过某一范围的单元格创建,这样可以更方便地对数据进行排序、筛选和设置格式。In Excel, you can create a table out of a range of cells, which makes it easier to sort, filter, and format data.

导入 Excel 工作簿时,Power BI 会查找这些表,并将它们导入数据集;如果找不到任何表,则你会看到此错误消息。When you import an Excel workbook, Power BI looks for these tables and imports them into a dataset; if it doesn't find any tables, you'll see this error message.

解决方案Solution

  1. 在 Excel 中打开工作簿。Open your workbook in Excel.

    备注

    此处的图片属于 Excel 2013。The pictures here are of Excel 2013. 如果你在不同版本,则显示内容可能稍有不同,但步骤是相同的。If you're using a different version, things may look a little different, but the steps are the same.

  2. 选择包含你的数据的单元格范围。Select the range of cells that contain your data. 第一行应包含列标题(列名):The first row should contain your column headers (the column names):

  3. 在功能区中插入选项卡上,单击In the ribbon on the INSERT tab, click Table. (或者,作为快捷方式,按 Ctrl + T。)(Or, as a shortcut, press Ctrl + T.)

  4. 你会看到以下对话框。You'll see the following dialog. 请确保表包含标题已选中,然后选择确定Make sure My table has headers is checked, and select OK:

  5. 现在数据格式化为表:Now your data is formatted as a table:

  6. 保存工作簿。Save your workbook.
  7. 返回到 Power BI。Return to Power BI. 选择左侧导航窗格底部的“获取数据”。Select Get Data at the bottom of the left navigation pane.

  8. 文件框中,选择获取In the Files box, select Get.

  9. 再次导入 Excel 工作簿。Import your Excel workbook again. 这次导入应找到表并且成功。This time, the import should find the table and succeed.

    如果导入仍失败,请单击帮助菜单中的“社区”来告诉我们:If the import still fails, let us know by clicking **Community **in the help menu: