Lock the spreadsheet for view-only embedding, disable individual features, or veto commands dynamically with a CommandExecuting handler. These are component-level rules — for workbook-level rules that round-trip through XLSX, see the Protection demo.
Set ReadOnly="true" to reject every mutating command. The user can still scroll, select, and copy — formatting, autofill, paste, undo, sheet add/remove and every toolbar action are all silently dropped.
Aptos Narrow
Arial
Aptos Narrow
Calibri
Cambria
Courier New
Georgia
Segoe UI
Tahoma
Times New Roman
Trebuchet MS
Verdana
14
8
9
10
11
12
14
16
18
20
22
24
28
36
48
72
title
Hex
R
G
B
A
opacity
Hex
R
G
B
A
All Borders
Outside Borders
Top Border
Bottom Border
Left Border
Right Border
No Border
Merge && Center
Merge Cells
Unmerge Cells
Greater Than...
Less Than...
Between...
Equal To...
Text Contains...
Arrow keys move between cells. Tab moves to the next cell. F6 moves to the toolbar and out. F2 or type to edit. Press Alt+Slash for all keyboard shortcuts.
Each Allow* parameter independently gates a single feature area. The Show* parameters control which parts of the chrome are rendered. All flags are independent — flip them in any combination.
helpArrow keys move between cells. Tab moves to the next cell. F6 moves to the toolbar and out. F2 or type to edit. Press Alt+Slash for all keyboard shortcuts.
Subscribe to CommandExecuting to veto specific commands at runtime — for role checks, audit gates, or any logic that depends on backend state. The handler is async, so you can await a backend check before calling PreventDefault().
Example
Edit Source
ReviewerApprover
Reviewers can edit values. Only approvers can change cell formatting.
helpArrow keys move between cells. Tab moves to the next cell. F6 moves to the toolbar and out. F2 or type to edit. Press Alt+Slash for all keyboard shortcuts.