Using the Office Add-in Development Kit with Visual Studio Code to create an Excel Add-in project, an issue was encountered where the undo function fails when deployed to users with Excel 2021.

Joan He 20 Reputation points
2025-12-11T09:49:44.91+00:00

After creating the Excel Add-in project using the official Office Add-in Development Kit in Visual Studio Code, I deployed and published it. I found that when using the Run button in Office 365, the undo/redo functionality works normally. However, when clicking the Run button in Office 2021, the normal undo/redo operations fail to function as expected.

User's image

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

Answer accepted by question author
  1. Kimberly Olaño 19,855 Reputation points Independent Advisor
    2025-12-11T12:18:04.32+00:00

    Thanks for sharing the details, Joan!

    Excel 2021 is a perpetual license product. Its Office-JS API level is fixed and does NOT receive monthly feature updates.

    Excel for Microsoft 365 does receive continuous API updates.

    Undo support in Office-JS requires newer APIs

    Features like:

    Workbook.addUndoAction()

    atomic batching for undo

    improved async operation handling were added after the Excel 2021 codebase shipped.

    Therefore:

    Excel 365 → supports undo in Office-JS

    Excel 2021 → does not support the newer undo framework

    Best regards,

    Kimberly


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.