I searched a lot for this but couldn't find any package or a guide on how to view a ".ppt" file on a webpage using react.js.
I'm allowing the user to upload a ".ppt" file, and I want him to be able to view that "Powerpoint" file in a web page, is that even possible?
I tried the following but it didn't work ...
<iframe
src={`https://view.officeapps.live.com/op/embed.aspx?src=[${linkToPPTFile}]`}
width="100%"
height="600px"
frameBorder="0"
></iframe>
Any help will be appreciated.
I also had this similar issue. The problem is with this part src=[${linkToPPTFile}]
of your iframe src. Remove the box brackets. It should just be:
<iframe
src={`https://view.officeapps.live.com/op/embed.aspx?src=${linkToPPTFile}`}
width="100%"
height="600px"
frameBorder="0"
>
</iframe>
It appears that particular Microsoft embed link no longer works. One way to make it happen is to store the PowerPoint file in a public folder online and create an embed code in PowerPoint for the Web (https://www.office.com/launch/powerpoint). The embed code should include an <iframe/>
tag.
There's more information about the process here: https://support.office.com/en-us/article/Embed-a-presentation-in-a-web-page-or-blog-19668A1D-2299-4AF3-91E1-AE57AF723A60
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With