0

Scenario: We consumed Power BI reports into our application. The user is changing report style (Example: Bar to Donut) on-demand and the user wants the selected style to export into PDF or PowerPoint (.ppt).

Is it possible with the Power BI REST API or Power BI SDK? If yes, what are some options or reference materials with code samples?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
nuthanmurari
  • 49
  • 1
  • 11

1 Answers1

0

To export the customized Power BI Embedded report as PDF or PowerPoint, you need the exportToFile API. The exportToFile API enables exporting a Power BI report by using REST calls, and it supports concurrent export job requests. You have to create an export job first and then follow the below steps:

  1. Sending the export request:
    Send an export request of a specific visual using ExportToFileInGroupAsync
  2. Polling:
    Check if the requested file is ready to export using polling and the export status
  3. Getting the file:
    Polling will return a URL. Use that URL to get the exported file and send it using a file stream.

Please find the reference and code here: Step 1 - sending an export request

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Rohit Ronte
  • 129
  • 3
  • Thanks @Rohit-ronte for answering. All the mentioned steps we successfully implemented at initial stage itself but our problem is different. It means on demand custom visual change in powerbi report to download. – nuthanmurari Dec 08 '21 at 15:34