Forum Discussion

majudd's avatar
majudd
Regular Visitor
1 year ago
Solved

How to grab static screen shots from a live PowerBI dashboard embedded in a PPT.

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 p...
  • v-saisrao-msft's avatar
    v-saisrao-msft
    1 year ago

    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.