Iframe for Excel Viewer giving random issue

Mital 0 Reputation points
2024-02-20T09:43:48.95+00:00

Hello Team, I am using the below code for Iframe loading into my custom website. It was working well previously. but Now If I am checking the viewer it is randomly giving 404 error sometimes and sometimes works fine. Can you please guide me through a solution for this? The purpose for Iframing is to show Excel viewer into the website as a previewer. User's image

Below Code Media_URL is URL for Excel sheet. Our Excel sheet having storage as AWS S3 URLS.
Access is not an issue as it is working sometimes if opening same previewer multiple times.

  <iframe
                
                title="Excel"
                style={{ width: `${weightState}%`, height: 'calc(100vh - 200px)' }}
                src={`https://view.officeapps.live.com/op/embed.aspx?src=${encodeURIComponent(
               Media_URL
                )}&amp;embedded=true`}

Microsoft 365 and Office | Install, redeem, activate | For business | Windows
0 comments No comments
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.