Tool Preview & Undo
X21’s preview and undo system lets you safely review and control Excel operations before they’re permanently applied.Tool Lifecycle
When the AI proposes an operation, it goes through these states:Tool States
Pending
- What it means: AI has proposed the operation
- What you see: Gray badge, “Pending Approval”
- Available actions: View, Approve, Reject
Viewing
- What it means: Changes applied temporarily for preview
- What you see: Blue badge, changes visible in Excel
- Available actions: Apply (confirm), Revert (undo preview)
Approved
- What it means: You’ve approved, ready to execute
- What you see: Green badge, “Approved”
- Available actions: Apply, Revert
Applied
- What it means: Changes committed to workbook
- What you see: Green checkmark, “Completed”
- Available actions: Revert (undo the operation)
Reverted
- What it means: Changes undone, back to original state
- What you see: Yellow badge, “Reverted”
- Available actions: Apply (re-apply the changes)
Errored
- What it means: Operation failed
- What you see: Red badge, error message
- Available actions: View error details, dismiss
Preview (View) Feature
How to Preview
- Find the pending tool card
- Click View button
- Changes apply temporarily to Excel
- Review the results
- Click Apply to keep or Revert to undo
What Gets Previewed
write_values:Preview Safety
- Preview changes are temporary
- Closing Excel reverts preview
- Other users don’t see preview
- Undo stack remains intact
Apply vs Revert
Apply
Commits the changes permanently:Revert
Undoes the operation:Undo Operations
After Application
Even after applying, you can still revert:- Find the tool card (now shows “Completed”)
- Click Revert button
- Changes are undone
- Original state restored
Revert vs Excel Undo
X21 Revert:- Undoes specific tool operation
- Preserves other changes
- Works across sessions
- Tracked by X21
- Undoes last action in Excel
- Sequential only
- Cleared on workbook close
- Built into Excel
Batch Operations
Multiple Tools
When the AI proposes multiple operations:Preview All
Click View on each tool separately to preview:- Tools execute in order
- Each preview builds on the previous
- Review cumulative effect
Approve All
Click Approve All to:- Approve all pending tools
- Execute in sequence
- Apply all changes
Advanced Features
Reapply After Revert
You can revert and reapply multiple times:- A/B testing different approaches
- Showing before/after to colleagues
- Experimenting with changes
Selective Undo
Revert specific operations while keeping others:Best Practices
Always Preview First
For important data:- View before approving
- Verify results in Excel
- Check formulas, values, formatting
- Only then Apply
Test with Copies
For risky operations:- Copy worksheet first
- Test on copy
- Review results
- Apply to original if correct
Use Revert Liberally
Don’t hesitate to revert:- Revert is instant and safe
- Better to undo than keep mistakes
- You can always reapply
Document Complex Changes
For multi-step operations:- Preview each step
- Take screenshots if needed
- Document what changed
- Easier to troubleshoot later
Common Scenarios
Scenario 1: Wrong Formula
Scenario 2: Format Experiment
Scenario 3: Structural Change
Limitations
What Can’t Be Reverted
Some operations are permanent:- remove_sheets: Deleted sheets cannot be restored
- remove_rows/remove_columns: Data permanently deleted
- VBA operations: Code changes committed immediately
Revert Time Limits
- Reverts work within the current session
- After closing Excel, revert history may be lost
- Important changes should be documented
Troubleshooting
Revert Button Disabled
Cause: Operation not yet applied or already reverted Solution: Check tool state badgeChanges Not Reverting
Cause: Excel has other unsaved changes Solution: Save workbook first, then revertPreview Not Visible
Cause: Changes in different sheet or scroll position Solution: Navigate to target range (click range reference in tool card)Related Topics
- Tool Management - Control available tools
- Tool Permissions - Approval workflow
- Best Practices: Tool Approval Workflow - Approval strategies

