Image embedding displays correctly on the Excel desktop application, the online viewer such as Onedrive or Sharepoint has different rendering behavior, causing same images to appear on all sheets

Srinidhi Anand 20 Reputation points
2025-09-11T07:35:25.3533333+00:00

Hi,

I am facing issue with Image embedding using ExcelJS. When embedding images in a single Excel file from multiple source excel files, problems arise when the file is opened in Sharepoint or oneDrive site.

While the same excel file with embedding images appear correctly In desktop view, they become overwritten across different sheets in the browser view, affecting the integrity of the data.

Details:

  • Library used: ExcelJS 4.4.0
  • Image Format: PNG
  • Embedding Method: addImage Method of worksheet using unique imageId
  • Positioning: tl anchor point and extension
  • Platform: share point online in Microsoft 365 Browser
  • Affected: chrome, Firefox, Edge.

Expected behaviour:

The images should remain unique and correctly placed in their respective sheets while viewing from the Sharepoint or OneDrive site.

The behaviour should match that observed in the excel desktop application. Any suggestion to resolve this would be helpful.

Thanks in advance.

Microsoft 365 and Office | Excel | For business | Other
0 comments No comments
{count} votes

Answer accepted by question author
  1. Matthew-P 7,535 Reputation points Microsoft External Staff Moderator
    2025-09-11T09:05:57.23+00:00

    Hi Srinidhi Anand,

    Welcome to Microsoft Q&A Forum!

    Have a great and and I hope you're doing well!

    I truly empathize and understand the challenges you're facing having images overridden in the web viewer (like OneDrive or SharePoint) while everything displays perfectly in Excel Desktop is incredibly frustrating and can really disrupt your workflow. I know that when working with image data from multiple sources, you expect consistency across platforms, and this issue can compromise the integrity of your files, especially when sharing with your team or clients. I've assisted with similar cases before, and I'm confident we can work through this together!

    To help me support you more effectively, could you share a bit more information? For example: a sample code snippet you're using (like the addImage part in ExcelJS), screenshots comparing Desktop vs. web app, or even a minimal .xlsx file for me to test. These details will give me better insights and allow me to suggest more precise solutions.

    In the meantime, while we work toward a permanent fix, here are a few temporary workarounds you can try right away to minimize the impact on your work:

    1. Clear cache and try in incognito browser: I get that this error might just be temporary due to caching, so let's try this simple step first. It often resolves things quickly! Then open the file in incognito mode (press Ctrl+Shift+N). If the issue persists, it could be a server or web viewer problem, and I'll help dig deeper.
    2. Prioritize opening in Desktop (if you need to view urgently): To avoid interruptions right away, I recommend encouraging users to download the file and open it in Excel Desktop. This ensures images display correctly 100% without any rendering issues. You can add a note when sharing on OneDrive/SharePoint: "If you need to view urgently, use 'Open in app' to open with Excel on your computer, helping avoid web errors and keep data accurate."

    I really want to help you get past this issue as quickly and effectively as possible, because I know it can be stressful in your daily work. Rest assured, I'll follow up closely and be here with you until everything is sorted. If you need more ideas or testing, feel free to share!


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   User's imageNote: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.  


Answer recommended by moderator
  1. Srinidhi Anand 20 Reputation points
    2025-09-19T09:14:26.0866667+00:00

    Hi Nghia-P,

    Though the question remain unsolved, the above responses can give clarity about embedding images proper anchoring queries. Hence anyone who have concern over image anchoring via exceljs can get help from here.

    As a workaround for time being, it is advisable to add all image content sheets followed by text content sheets to avoid such image leaks in web view.

    Still welcoming answers to find and resolve the root cause of issue.

    Thanks for support.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.