Recently I came across a scenario where I need to display document on PowerApp portal.
Since most of the website allow users to download publicly available document from there website, in PowerApp portal there isn’t any straight solution.
But we can achieve it by a simple trick , all it needs is five minutes and five steps, assuming you already have a portal configured and a page where you want your document to be embedded.
Step 1:
Create a shareable link of a document by clicking on Copy Link as shown in image below.

Step 2
Set your permission level , I removed edit option so that people can only download the file, not edit it online.

Step 3
Insert an IFrame in your portal page

and now here is the important part.
Step 4
In the end of your document shareable link add this little text
&action=embedview
for example if your url is like this.
https://crm669197-my.sharepoint.com/:x:/g/personal/admin_crm669197_onmicrosoft_com/EcOPjSe4smRArejKciFxE5YBLQU1Fn81iHRKa-WMCACnSw?e=BvgV8V
Your updated URL will look like this.
https://crm669197-my.sharepoint.com/:x:/g/personal/admin_crm669197_onmicrosoft_com/EcOPjSe4smRArejKciFxE5YBLQU1Fn81iHRKa-WMCACnSw?e=BvgV8V&action=embedview
Step 5
Paste your updated URL into Link property of the IFrame.

Its done, so now whenever a visitor visits portal, they can view your excel , download it or edit it, based on the permission you’ve set while creating shareable link (in Step 1).

It doesn’t require any sign in because we are controlling document access using link permission (in Step 2).
To download and view excel visitor can click on the button available in bottom right corner.
I am still looking for a solution to embed a folder , if you have done it Let me know in comment section below , or if you have any thoughts about this post do let me.
🙂
Thank you.
Such wonderful blogs with almost all the current scenarios intact..
LikeLiked by 1 person