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?
To export the customized Power BI Embedded report as PDF or PowerPoint, you need the
exportToFile
API. TheexportToFile
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:Send an export request of a specific visual using ExportToFileInGroupAsync
Check if the requested file is ready to export using polling and the export status
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