Office Scripts loses workbook association despite remaining accessible and executable by owner

Monica Bell 0 Reputation points
2026-10-02T16:07:04.5066667+00:00

During failure periods, Office Scripts are removed from the workbook's associated script list and worksheet buttons cease functioning. The workbook reports that the script has been unshared. However, the script itself remains accessible under Recent Scripts, can be opened in the editor, and can be run successfully by the owner. Re-enabling "Associate with workbook" and re-adding the button immediately restores functionality. This behavior has occurred every 3 days for the last 2 months despite testing SharePoint-hosted scripts, OneDrive-hosted scripts, workbook buttons, and shared script configurations. I have reported this through my local IT, but they have not been able to help identify any user-based error or system settings that could be contributing to this.

  1. What process writes the Associate with workbook flag?
  2. What process removes it?
  3. Is there any automated cleanup job, sync process, or workbook metadata refresh that could clear associations after several days?
Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

1 answer

Sort by: Newest
  1. Dante Vo 0 Reputation points Independent Advisor
    2026-10-02T17:22:02.86+00:00

    Hi @Monica Bell , thank you for posting your question in the Microsoft Q&A forum.

    Since you can still open and run the script, I'd focus on its workbook association. The script is stored separately and linked to the workbook, which explains how it can remain available even when that link is lost.

    Turning on “Associate with workbook” creates the link. Turning it off stops sharing and removes the script buttons, while deleting a button alone leaves the association intact.

    One thing I'd like to check is whether Excel for the web shows the same problem. If you're using desktop Excel, open the same workbook in your browser with the same account when it next happens, before re-enabling the association. Under Automate, check whether the script is also missing from “This workbook.”

    If it remains listed in the browser, the next checks should focus on the desktop app and its version. If it's missing in both, I'd review whether the workbook or script was moved, replaced, or restored around that time.

    Was this answer helpful?

    0 comments No comments

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.