Explore the API
Customize ribbon tabs, groups, and buttons
Start with a focused expense-entry ribbon, switch to a finance-review or full-authoring preset, then enable, disable, or hide a tab, group, or button.
ResultLive API output
Disable Home or Font and then enable Bold to see parent policies take precedence. Restore all commands to clear every restriction. Reset sample restores Expense entry.
Preparing sample...
Keep exploringReset or save
Reset restores this sample's starting document. TXWB retains its spreadsheet, dashboard, and reporting definitions.
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Customize ribbon tabs, groups, and buttons
RibbonApi.items exposes stable, language-independent IDs for tabs, groups, and controls, including contextual commands. configure() validates and merges partial policies atomically. A disabled or hidden parent affects all descendants, so enabling Bold cannot override a disabled Font group or Home tab. The presets call reset() before applying their complete configuration; individual controls use partial patches. These are UI policies rather than access restrictions: they do not block keyboard editing or workbook API calls. Combine them with worksheet protection when your document requires editing rules.
APIs used
editor.ui.ribbon.items
editor.ui.ribbon.configure({ tabs, groups, buttons })
editor.ui.ribbon.reset()
RibbonItem.id
RibbonItem.parentId
How to explore
Start with a focused expense-entry ribbon, switch to a finance-review or full-authoring preset, then enable, disable, or hide a tab, group, or button.
Disable Home or Font and then enable Bold to see parent policies take precedence. Restore all commands to clear every restriction. Reset sample restores Expense entry.
Document ownership
The ready event supplies the initialized editor. Each action resolves document objects from the current workbook. Reset loads a clean TXWB snapshot; worksheet, range, chart, and dashboard handles must be acquired again after loading.
The Code panel shows this sample's actual implementation and the shared hosting code. Downloads contain the current document; changes are not stored on the server.
NuGet packages
TXTextControl.TXSheetControl.AspNetCore
2.0.0
Provides the Razor spreadsheet editor, browser APIs, and packaged fonts.
dotnet add package TXTextControl.TXSheetControl.AspNetCore --version 2.0.0