Microsoft Patents a Preview Mode for AI-Written Spreadsheet Fixes Before They Touch Your Data
Microsoft's patent application takes on a question every AI spreadsheet user eventually faces: what will this code do to my file? The answer is to run it on a throwaway copy first and show you the result.

- Publication number
- US 2026/0386868 A1(US20260386868A1)
- USPTO patent title:
- Isolated Generation of Script Previews for Spreadsheet Applications
- Applicant
- Microsoft Technology Licensing, LLC
- Filed · Published
- May 30, 2025 · Dec 3, 2026
- Inventors
- Gergely Zsolt KOTA, Ion Viorel DUMITRU, Or KEREN, Gil ANTAKI, Raz AZARIA, Konrad Pawel TUPAJ, Arturo GOICOCHEA HOEFKEN, Qiwei ZHENG, Nicholas Kyle RYAN, Kathryn Veronica Jean SULLIVAN, Shahar SONINO, Jason Chieh LEE
- Status when we published
- Waiting for an examiner
- Document
- 20 claims
- US classification
- 718/1
What Microsoft's spreadsheet preview actually does
You ask an AI helper to tidy up your budget spreadsheet, and it hands back a block of code you can't read. Do you click run and hope? One bad line could wipe out rows you spent weeks building, and there's no guarantee you can undo it.
Microsoft's patent application describes a safer first step. Before anything touches your real file, the system makes a private copy and runs the code on that. It then shows you what changed: which cells were edited, what a new chart looks like, and so on. The code can update cells and do math, but it is blocked from things like reaching out over the internet or opening files on your computer.
If the result looks right, you press an Apply button and the same code runs on the real thing. If it doesn't, you tweak it or toss it, and nothing was ever at risk.
… executing the script in a simulation environment, isolated from the runtime environment, to produce a simulated outcome, wherein the simulated outcome includes one or more changes to an isolated instance of the spreadsheet hosted in the isolated environment; …
Translation: The system tests the AI code safely away from your real spreadsheet.
How the test copy keeps your real sheet safe
The filing covers a preview step for spreadsheet scripts (short programs that edit cells, apply formulas or build charts). The script can be one you wrote yourself or one an AI assistant produced. In the AI case, the system sends a prompt (a written instruction) to a language model (the type of AI behind chatbots) and gets code back.
Next comes the key move. The code runs in a simulation environment, a walled-off setup that is isolated from the live spreadsheet app. The script edits an isolated instance (a duplicate of your file) while your real sheet stays untouched. The sandbox follows simple rules:
- Allowed: cell updates and formula calculations.
- Blocked: network calls (reaching out over the internet) and file access.
- Checked: the description also mentions scanning for known vulnerabilities or malicious patterns.
From the results, the system builds a preview showing at least one of the changes. In the filing's examples, that is a step-by-step list, a plain-text description and a picture of the affected cells, shown in a side panel for requests like 'Bold the highest grade in my table.' An Apply button then runs the script on the live file.
The language model can also be asked to suggest edits to the script, or to review the simulated changes for potentially negative outcomes. Those warnings can appear in the preview.
… generating a preview based at least on the simulated outcome and causing display of the preview of the script. The preview may include, for example, a representation of at least one of the changes to the isolated instance of the spreadsheet
Translation: It then shows you what the AI plans to alter before anything actually happens.
Why a preview button could calm AI nerves
If you've hesitated to let an AI assistant edit a spreadsheet that took you weeks to build, this is aimed at that worry. A preview you can read turns 'run this code and hope' into 'check the result, then decide.' That matters most for people who can't read code, which describes most spreadsheet users. The filing itself says fear of unintended changes can keep people from using automation at all.
For Microsoft, the payoff is trust in its AI helpers. The spreadsheet side panel in the filing could fit Microsoft 365 Copilot, though the filing never names a product. A patent application is not proof that a feature is on its way.
Microsoft's 43rd filing we've tracked since July in the AI guardrails race follows its work on blocking data leaks and stress-testing chatbot filters.
Source: US 2026/0386868 A1 at the USPTO (PDF). Full patent text and figures are in the official publication.
Get our take in your Top Stories
Liked this breakdown? Add Patentlyze as a preferred source on Google, and our plain-English take shows up more often in your Top Stories the next time Microsoft patent news breaks.
We read the new patents from Big Tech, carmakers and more and send you the ones worth knowing. Plain English, free, every week.
The drawings · 13 sheets
13 drawing sheets from US 2026/0386868 A1 · click any drawing to enlarge

No comments yet