Skip to main content

Export report to PDF, PPTX and PNG files using Power BI REST API (Preview)

Headshot of article author Alon Baram

In Power BI Service you can already publish your report to PDF or PowerPoint formats and easily create a document or a slide deck based on your Power BI report. Today we are thrilled to announce an additional layer of capabilities, allowing you to export a Power BI report by using a REST call, to the following file formats: PDF, PPTX (PowerPoint) and PNG.

You can use this Export-To-File API in a variety of ways, such as:

Send to print button – In your application, create a button that when clicked on triggers an export job. The job can export the viewed report as a PDF or a PPTX, and when it’s complete, the user can receive the file as a download. As the API is asynchronous, it may take some time for the file to be available.

Email attachment – Send an automated email at set intervals, with an attached PDF report. This scenario can be useful if you want to automate sending a weekly report to executives.

When the Export-To-File API is called, it triggers an export job. After triggering the export job, you can use the Polling API to track the job until it is complete. When the export job is complete, the Polling API call returns a Power BI URL for getting the file (The URL is available for 24 hours). The API supports concurrent export job requests. The number of jobs you can run at the same time, depends on the SKU your report resides on, as detailed in this table.

The following set of capabilities are provided with the new API:

  • Export selected report pages – You can specify which pages you want to export and in what order.
  • Bookmarks – Using Bookmarks capabilities, you can use the API to export a report in a specific state, after applying filters to it.
  • Row Level Security (RLS) – With Row Level Security (RLS), you can export a report showing data that is only visible to certain users. For example, if you are exporting a sales report that is defined with regional roles, you can programmatically filter the report so that only a certain region is displayed.
  • Data protection – The PDF and PPTX formats support sensitivity labels. If you export a report with a sensitivity label to a PDF or a PPTX, the exported file will display the report with its sensitivity label.
  • Localization – When using the API, you can pass your desired local. The localization settings affect the way the report is displayed, for example by changing formatting according to the selected local.

Please be aware that, both the report and the dataset of the report you are exporting, must reside on a Premium or Embedded capacity. Other public preview limitations  are detailed in the Export report to file article.

Please also be aware that as all new Power BI APIs, the Export-To-File API is included only in the Power BI APIs .NET SDK v3.

What’s coming next…

Later this month, we will also have support for paginated reports through this API as well. There are several additional capabilities through the API you will have for paginated reports, including additional file formats, formatting options and data sources supported. Look for a full blog post from the Power BI team once that support is live.

 

Please use the following resources to learn more about the new API, get your questions answered, and give us feedback and suggestions:

Export report to file article

Export report to file code examples

Export report to file public preview limitations

Export report to file concurrent requests handling