The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a PPT in which I am displaying a page from a dashboard. I can interact with the dashboard in the PPT which is really cool, and can also set it to screenshot (either public view or limited to people with access to the dashboard). I would like to write a python script to open this PPT, then detect if the dashboard is set to live, and if so, either reset it to public screenshot, or switch to an actual png screenshot (preferable). Then write to another PPT file with a new name = the original name with the date appended to it. I can do everything except to turn the dashboard into a screenshot. Python-pptx is recognizing the page, but does not recognize the dashboard part of the page as a shape, so I have no way to manipulate it.
We are looking to set up this process so that we can create and save monthly reports.
Solved! Go to Solution.
Hi @majudd
Thank you for reaching out to the Microsoft Fabric Forum Community.
Thank you @lbendlin, for your insights.
The challenge you're facing arises from the nature of Power BI's integration in PowerPoint the Power BI add in embeds interactive objects that are not accessible via the python-pptx library, which only handles standard shapes like images or text boxes.
As such, it’s not possible to detect, modify, or replace these live reports programmatically using python-pptx. To generate static, monthly snapshots instead, we recommend using the Power BI REST API to export the desired report page as an image with applied filters or slicers.
This image can then be inserted into the presentation using python-pptx. Although you can't programmatically remove the embedded object, you can overlay the snapshot on top of it or use PowerPoint's COM API (win32com in Python) for full control. Note that switching the embedded report to “public screenshot” mode must still be done manually, as it’s not exposed through automation.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
Sorry, I am new to this so I may not have the lingo down correctly. I used the add feature in PPT to include a page from a dashboard into my PPT. I can set this page to "live" in which case it is active, can be manipulated by the various drop downs, change the months shown, etc. I think of that as a dashboard. I need to create a 2nd PPT where the page is just static and captures the info from one point in time. I assume that the page with the live view is updated every time the first PPT is opened. Thank you for the link, I will look into it!
Hi @majudd
Thank you for reaching out to the Microsoft Fabric Forum Community.
Thank you @lbendlin, for your insights.
The challenge you're facing arises from the nature of Power BI's integration in PowerPoint the Power BI add in embeds interactive objects that are not accessible via the python-pptx library, which only handles standard shapes like images or text boxes.
As such, it’s not possible to detect, modify, or replace these live reports programmatically using python-pptx. To generate static, monthly snapshots instead, we recommend using the Power BI REST API to export the desired report page as an image with applied filters or slicers.
This image can then be inserted into the presentation using python-pptx. Although you can't programmatically remove the embedded object, you can overlay the snapshot on top of it or use PowerPoint's COM API (win32com in Python) for full control. Note that switching the embedded report to “public screenshot” mode must still be done manually, as it’s not exposed through automation.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
I have a PPT in which I am displaying a page from a dashboard
I don't think that is possible. You can only embed report pages, not dashboards.
I can do everything except to turn the dashboard into a screenshot.
Report page, not dashboard. Use the REST API calls to render report pages to PPTX
Reports - Export To File In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn