Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Worksheet OnChanged event does not return details when multiple cells are edited #5347

Closed
harsh-borad opened this issue Feb 3, 2025 · 5 comments
Assignees
Labels
Area: Excel Issue related to Excel add-ins

Comments

@harsh-borad
Copy link

harsh-borad commented Feb 3, 2025

Environment

  • Platform : PC desktop
  • Host : Excel
  • Office version number: Microsoft® Excel® for Microsoft 365 MSO (Version 2412 Build 16.0.18324.20092) 64-bit
  • Operating System: Windows 11

Description

I am using the Worksheet.OnChanged event in office.js to capture valueBefore and valueAfter for cell changes. When I change a single cell, the event provides the details object with changeType: "RangeEdited" along with valueBefore and valueAfter.

However, when I edit multiple cells at once (e.g., deleting values into a range), the details object is undefined. This makes it impossible to track value changes for multiple-cell edits.

So below I attached the Screenshot of both the differences.

Expected behavior

The details object should provide valueBefore and valueAfter for all modified cells, similar to how it works for a single cell.

Current behavior

For multiple-cell edits, details is undefined, making it impossible to track the changes.

Steps to reproduce

  1. Register Worksheet.OnChanged event to capture valueBefore and valueAfter.
  2. Modify a single cell → details contains valueBefore, and valueAfter with its other objects.
  3. Modify multiple cells at once (e.g., delete a range of values) → details is undefined.

Useful logs

  1. When "RangeEdited" in single Cell

Image

  1. When "RangeEdited" in mutiple Cells or Range

Image

Point to be noted

This concern is raised because when we are checking Excel's in built Review -> Show Changes ,we got the its tracked before and after values for the same Range "CD:C4".

Image

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Feb 3, 2025
@ElizabethSamuel-MSFT ElizabethSamuel-MSFT added Needs: attention 👋 Waiting on Microsoft to provide feedback Area: Excel Issue related to Excel add-ins Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Feb 3, 2025
@ElizabethSamuel-MSFT
Copy link
Contributor

@harsh-borad Thanks for raising this issue.

@XuanZhouMSFT Can you take a look and reassign if needed?

Thanks.

@harsh-borad
Copy link
Author

@ElizabethSamuel-MSFT @XuanZhouMSFT any update on this?

Please suggest me any temporary alternative for this !!!

@XuanZhouMSFT
Copy link

Hi @harsh-borad, Thanks for reporting this issue. For Worksheet.onChanged event details, we only support for single cell change. You can also reference the document for this API here: Excel.WorksheetChangedEventArgs.

We recommend you to upvote or submit a new Tech Community New Ideas item, this will give us visibility of the commonality of it and will help with our prioritization. If we end up working on this issue, we will re-activate as needed.  Microsoft 365 Developer Platform - Microsoft Community Hub

@XuanZhouMSFT XuanZhouMSFT added Needs: author feedback Waiting for author (creator) of Issue to provide more info and removed Needs: attention 👋 Waiting on Microsoft to provide feedback Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs labels Feb 5, 2025
@harsh-borad
Copy link
Author

harsh-borad commented Feb 5, 2025

@XuanZhouMSFT
Thank you for your response. I appreciate the guidance on submitting a new idea or upvoting existing ones on the Microsoft Tech Community. I understand that this helps with visibility and prioritization. I will proceed accordingly and look forward to any future updates if this issue is considered for development.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: attention 👋 Waiting on Microsoft to provide feedback and removed Needs: author feedback Waiting for author (creator) of Issue to provide more info labels Feb 5, 2025
@guoms1
Copy link

guoms1 commented Feb 5, 2025

Close this issue since there is no more action needed.

@guoms1 guoms1 closed this as completed Feb 5, 2025
@guoms1 guoms1 removed the Needs: attention 👋 Waiting on Microsoft to provide feedback label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Excel Issue related to Excel add-ins
Projects
None yet
Development

No branches or pull requests

4 participants