创建一个在Power BI中导出到Excel的按钮。

huangapple go评论118阅读模式
英文:

Create a export to excel button in Power BI

问题

我需要创建一个按钮(比如“导出到Excel”),以便从Power BI中的表格中导出数据。这个文件需要下载到我的PC上的一个文件夹,例如“Download”或“Desktop”。换句话说,这个文件不能上传到SharePoint或OneDrive,而是要下载到桌面内存中。我该怎么做?

我尝试使用Power Automate创建一个按钮,但在Power Automate中,唯一的选项是将CSV文件下载到OneDrive或PowerBI,这不是我需要的。我还尝试从表格创建一个URL,但没有成功。正如我所说,我需要一个按钮来在我的PC上下载一个Excel文件(从Power BI中的一个表格)。

英文:

I need to create a button (like "Export to Excel") in order to export data from a table in Power BI. This file needs to be downloaded in a folder on my PC, for example the folder "Download" or "Desktop". In other words, this file can't go to SharePoint or OneDrive, but to the Desktop's Memory. How can I do that?

I tried to create a button with Power Automate, but, in PA the only option is to download the CSV file in OneDrive or PowerBI, and that's not what I need. Also, I tried to create an URL from the table, but it didn't work. As I said I need a button to download a excel file (from a table in Power BI) in my PC.

答案1

得分: 1

我有类似的问题,费尽心思找解决方案,最终找到了以下步骤:

  1. 复制包含要导出表格的页面(稍后会更清楚)
  2. 在原始页面上,单击要导出的表格
  3. 点击 Power Automate 按钮 - 由于选择了表格,这将自动选择要导出的列
  4. 点击 ... 然后点击编辑 - 这将在 Power BI 中打开一个 Power Automate 会话
  5. 点击新建并创建新的即时云流
  6. 选择下一步,选择 "Compose" > 选择 PowerBI 数据
  7. 再次点击下一步,选择 "Create CSV table" > 选择输出,并确保在列中选择 "自动"
  8. 点击下一步,选择 OneDrive 并输入 OneDrive 帐户和位置(屏幕截图中显示 SharePoint,因为多个用户将使用此导出按钮)
  9. 在文件名中输入要导出的名称,然后在末尾添加 .CSV。我包括了时间戳选项,以确保每次使用按钮时文件都是唯一的,以防止文件被覆盖。
  10. 文件内容 = 来自 CSV 表的输出
  11. 保存并应用
  12. 返回到 Power BI 并格式化您的按钮,但您会注意到表格已经消失。从创建的重复页面复制并粘贴表格,然后删除

需要注意的一点是,这种方法与按 ... 和导出数据集具有相同的导出数据集的限制。与标准方法不同的是,这种方法不会警告最终用户未导出完整数据集。

Curbal 在 YouTube 上发布了如何使用按钮导出 100,000 行数据的方法。 示例

英文:

I had a similar problem and looked high and low for a solution in the end I found the following steps:

  1. Take a copy of the page with the table on which you want to export (This will make more sense further down)
  2. On the original page click on the table you want to export
  3. Press the Power automate button - as you've selected the table this will automatically select the columns you wish to export
  4. Press ... and go to edit - this will open a powerautomate session from within powerbi
  5. Click new and create a new instant cloud flow
  6. Select Next Steps and pick compose > select PowerBI data
  7. Press Next Step again and Select Create CSV table > select Output and ensure automatic is selected in columns
  8. Click Next Step and select OneDrive and put in Onedrive account and Location (Screenshot has sharepoint as multiple user will be using this export button)
  9. With the file name put the name you want to export and put.CSV at the end. I included the timestamp option so the files are unique everytime the button is used to ensure files are not overwritten.
  10. File content = output from the csv table
  11. Save and apply
  12. Go back to powerbi and format your button but you will notice the table has gone. Copy and paste the table from the duplicate page you created and delete

One Caveat to note is this method has the same limitation of exporting datasets as pressing ... and export. The downside to this is unlike the standard method this does not warn end users that there full dataset has not exported.

Curbal on youtube has just released a method on how to export 100k rows using the button

Example

huangapple
  • 本文由 发表于 2023年3月31日 20:42:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/75898669.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定