# Ribbon and Contextual Commands

> Use the ribbon tabs Home, Insert, Data, Formulas and Reporting and the contextual tabs, switch to compact view and hide or disable commands with RibbonOptions.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Sheet Control > Spreadsheet Editor > Ribbon and Contextual Commands
- **4675 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/ribbon/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/ribbon/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/ribbon/llms-full.txt

---

Formatting cells, inserting a chart, preparing a printed report, designing a mail merge template: the ribbon of the spreadsheet editor holds the commands for each of these, grouped in tabs. Contextual tabs such as **Table Design** and **Chart Design** appear when the selection calls for them.

The sections below walk through every tab with its groups and an example task. The screenshots use the [sales and invoice sample documents](https://docs.textcontrol.com/tx-sheet-control/overview/sample-documents/llms-full.txt).

### How the Ribbon Works

The ribbon collects the commands for the current selection:

- **Select first.** Select cells before formatting, a table cell before changing a table or a chart before editing its design. Review the selected address or object before you apply a change.
- **Unavailable commands.** A command can be unavailable when the selection, sheet protection or the configuration of the host application prevents the operation.
- **Undo and redo.** Commands participate in the supported undo and redo. Observe the document [events](https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/events/llms-full.txt) when your application needs to react to edits.
- **Narrow editors.** On a narrow editor, a group such as **Font**, **Number** or **Styles** may collapse to one button. Open that button to see the same commands.

On touch devices, including landscape and wide mobile layout viewports, the classic ribbon displays one row of group tiles with readable labels. Swipe the command row horizontally to reach more groups, then tap a tile to open its complete controls. The classic touch command frame stays 112 CSS pixels high across tabs. Compact touch mode uses one 60-pixel command row with touch-sized controls. Opening group popups does not resize the worksheet. Compact and tabs-only views remain available through the display handle.

![Classic mobile ribbon with readable Clipboard, Font, Alignment and Number group tiles](https://docs.textcontrol.com/assets/img/tx-sheet-control/ribbon-mobile.613a35fd.webp)

In the preview website, click an image to open it at full size.

### Choose a Ribbon View

The small handle at the right end of the tab strip opens **Ribbon Display Options**. Choose **Classic Ribbon** for the full command groups or **Compact Ribbon** for a single row of common commands. In compact view, the ellipsis at the end of each group opens its complete controls. On a narrow editor, scroll the command row horizontally. Dropdowns retain their complete text labels. Inline checkbox settings keep their labels and context, and input fields use the same styling as classic view.

![Compact Home ribbon with common font, alignment and editing commands](https://docs.textcontrol.com/assets/img/tx-sheet-control/ribbon-compact.c08af7fe.webp)

**Show Tabs Only** keeps the tab strip visible and opens a temporary command panel when you select a tab. Click outside the ribbon or press Escape to dismiss the panel. Ctrl+F1 switches between expanded commands and tabs-only; the selected classic or compact density is retained. These views also apply to the dashboard ribbon.

![Tabs-only ribbon with the Home commands temporarily open over the worksheet](https://docs.textcontrol.com/assets/img/tx-sheet-control/ribbon-tabs-only.b7349a32.webp)

### Configure Ribbon Commands

Use the `ribbon` constructor option to choose the initial view and disable or hide built-in commands. This browser TypeScript example creates a report editor with a compact ribbon, disables Reporting and Clipboard and hides Italic. Deploy the font catalog at the URL shown before using the example.

```typescript
import { Spreadsheet } from '@txtextcontrol/tx-sheet-control';

function createReportEditor(host: HTMLElement) {
    const editor = new Spreadsheet(host, {
        height: 600,
        fontCatalogURL: '/assets/sheet/fonts/catalog.json',
        ribbon: {
            layout: 'compact',
            displayMode: 'expanded',
            tabs: { reporting: { enabled: false } },
            groups: { 'home.clipboard': { enabled: false } },
            buttons: { 'home.font.italic': { visible: false } },
        },
    });
    editor.workbook.sheets.at(0).cell('A1').setText('Sales report');
    return editor;
}
```

The [RibbonOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonoptions/llms-full.txt) maps use language-independent IDs. Obtain them from [editor.ui.ribbon.items](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonapi/items-property/llms-full.txt). Groups and controls have fully scoped IDs, such as `home.font` and `home.font.bold`. Catalog labels follow the current UI language; use IDs as configuration keys. Hidden contextual commands are included, and context-specific gallery choices can appear when created.

Apply later changes through [configure](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonapi/configure-method/llms-full.txt). Omitted values remain unchanged, so re-enable an item explicitly or call `reset()` to clear all policies and restore classic, expanded commands.

```typescript
import type { Spreadsheet } from '@txtextcontrol/tx-sheet-control';

function enableClipboard(editor: Spreadsheet) {
    editor.ui.ribbon.configure({
        groups: { 'home.clipboard': { enabled: true } },
        buttons: { 'home.font.bold': { enabled: false } },
    });
    editor.ui.ribbon.displayMode = 'tabs-only';
}
```

A false parent policy applies to its descendants: enabling a button cannot override a disabled group or tab. Hidden commands are also removed from group overflow. Enabling policy does not override protection or an unavailable selection. Invalid IDs and values throw before the patch changes any settings.

Ribbon settings belong to the editor and survive workbook loads; they are not saved in workbook data. These UI policies do not restrict workbook API calls or keyboard editing. Use worksheet protection for document editing rules. `editor.ui.ribbon.visible` hides the entire ribbon, independently of item policies; `reset()` preserves that setting.

Angular accepts the same `ribbon` object through its `options` input and merges supplied ribbon settings when those options change. In ASP.NET Core, set [TXSheetControlOptions.Ribbon](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-aspnetcore/txsheetcontroloptions/ribbon-property/llms-full.txt) to an anonymous object with camelCase property names; Razor forwards it to the browser constructor.

### Home: Everyday Cell Editing

![Home ribbon showing the groups Clipboard, Font, Alignment, Number, Styles, Cells and Editing](https://docs.textcontrol.com/assets/img/tx-sheet-control/ribbon-home.807a6d93.webp)

| Group | What to use it for | Example |
|---|---|---|
| Clipboard | Copy, cut and paste a selection | Copy a formula to the next reporting period |
| Font | Family, size, emphasis, borders and colors | Give a heading a bold font and a contrasting fill |
| Alignment | Horizontal and vertical alignment, wrapping, orientation and merging | Wrap a long product description inside its column |
| Number | Display category, currency and accounting formats, percent, grouping and decimal places | Show the Revenue column as dollars without changing its numeric values |
| Styles | Conditional Formatting and reusable cell styles | Add data bars to compare account revenue |
| Cells | Insert and delete cells, rows and columns; access formatting commands | Add another line to a worksheet report |
| Editing | Common editing, selection and lookup commands | Locate a value before editing it |

Small launchers at the bottom of the Font, Alignment and Number groups open the shared [Format Cells dialog](https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/format-cells/llms-full.txt). Use the dialog when a change needs several settings together. [Conditional formatting](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/conditional-formatting/llms-full.txt) shows the visual difference between direct styles and calculated rules.

The fonts the editor offers come from the configured [font deployment](https://docs.textcontrol.com/tx-sheet-control/deployment/fonts/llms-full.txt).

### Insert: Add Objects to a Worksheet

![Insert ribbon with table, illustration, chart, sparkline and cell-feature commands: Table, Pictures, Shapes, Recommended Charts, the chart families, the Line, Column and Win/Loss sparklines, Hyperlink and Cell Type](https://docs.textcontrol.com/assets/img/tx-sheet-control/ribbon-insert.c973118d.webp)

Start with a data range when you insert a table or a chart. The objects of this tab differ:

- **A table** adds named columns and filtering to the range.
- **A chart** visualizes the values of its source.
- **Pictures and shapes** are placed over the worksheet.
- **Sparklines** show compact trends in cells.

For example, select the Region and Revenue columns on **Summary**, choose a chart family and review the [chart dialog](https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/chart-dialogs/llms-full.txt) before you confirm. Selecting the inserted chart then shows **Chart Design**. The document objects behind these commands are described in [tables](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/tables/llms-full.txt), [charts](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/charts/llms-full.txt) and [drawings](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/pictures-shapes/llms-full.txt).

### Page Layout: Prepare the Printed Report

![Page Layout ribbon with worksheet page and print controls: Margins, Orientation, Size, Print Area, Breaks, Scale to Fit, the gridline and heading options, the workbook views and the Freeze Panes and Unfreeze Panes commands](https://docs.textcontrol.com/assets/img/tx-sheet-control/ribbon-page-layout.d3336e15.webp)

Choose the paper size, orientation, margins, print area and scaling of the active worksheet. These are settings saved in the document. Changing the display zoom of the editor only changes the view on the screen.

A useful workflow for a sales report:

1. Select the report range.
2. Set the print area.
3. Choose landscape orientation.
4. Fit the report to one page wide.
5. Review the result in Page Layout view before the [PDF export](https://docs.textcontrol.com/tx-sheet-control/pdf/export/llms-full.txt).

A tall report can remain several pages high. Forcing both the width and the height to one page can make its text too small.

### Data: Work With Structured Inputs

![Data ribbon with sorting, filtering, transformation and validation commands: Sort, Filter, Clear, Reapply, Advanced, Text to Columns, Remove Duplicates, Consolidate, Generate Dashboard, From Selection and Data Validation](https://docs.textcontrol.com/assets/img/tx-sheet-control/ribbon-data.59bc556b.webp)

Use sorting and filtering to inspect records, and the transformation commands to prepare data. Sorting changes the order of the rows. Filtering hides the rows that don't match without deleting them. Preview operations such as splitting text or removing duplicates before you apply a change to existing cells.

**Data Validation** describes the acceptable input for a selection. For instance, select Units and allow whole numbers between 1 and 500. The [validation guide](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/validation/llms-full.txt) illustrates the dialog and explains prompts and error messages. For row-based workflows, use [sorting and filtering](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/sorting-filtering/llms-full.txt).

### Formulas: Build and Inspect Calculations

![Formulas ribbon with Name Manager, Trace Precedents, Trace Dependents, Remove Arrows, Highlight Dependents and Calculate Now](https://docs.textcontrol.com/assets/img/tx-sheet-control/ribbon-formulas.a07f4d2e.webp)

- **Name Manager** makes repeated formulas easier to read with named cells and ranges.
- **Trace Precedents** shows the cells a formula uses.
- **Trace Dependents** shows the formulas that use the selected cell.
- **Remove Arrows** clears this visual aid.
- **Calculate Now** requests a recalculation.

The **Formula Designer** button beside the formula bar finds functions, accepts arguments and shows a preview of the result. The formula bar also accepts a known formula directly.

In the sales example, Revenue is Units multiplied by Price, and the total is `SUM(F4:F27)`. Select the total before you open the designer, so that its destination and its current formula are clear. More on this in [Formula Designer](https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/formula-designer/llms-full.txt), [calculation](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt) and [names](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/named-ranges/llms-full.txt).

### Highlight Formula Dependents After Editing

![Editing B2 highlights the directly and indirectly dependent formulas in C2, D2 and E2 in green](https://docs.textcontrol.com/assets/img/tx-sheet-control/dependent-cell-highlight.d5aaf0ef.webp)

**Formulas → Formula Auditing → Highlight Dependents** enables brief green feedback after a cell value or formula changes. Both direct dependents and formulas farther down the reference chain are included. The highlight fades after about 1.4 seconds. Its position follows scrolling, zoom, merges and frozen or split panes. Reduced-motion mode displays a brief static highlight.

Use the API to keep the setting synchronized with your application:

```javascript
editor.ui.highlightDependents = true;
const sheet = editor.workbook.sheets.at(0);
sheet.cell('B1').setFormula('=A1*2');
sheet.cell('C1').setFormula('=B1+10');
sheet.cell('A1').setValue(25);
```

Set `highlightDependents: false` in the editor constructor options to start with the effect disabled. This editor preference survives workbook loads and never changes saved cell formatting or exported output.

### Review: Annotate and Protect

![Review ribbon with comment, note, protection and accessibility commands, including Read Worksheet Data, Worksheet Objects, Keyboard Help and Check Accessibility](https://docs.textcontrol.com/assets/img/tx-sheet-control/ribbon-review.bc88e3a8.webp)

Comments and notes attach explanations to cells. **Protect Sheet** controls the permitted worksheet operations. Select a cell before you add an annotation, and review the allowed actions before you apply protection to the sheet.

The Locked and Hide Formulas settings in **Format Cells → Protection** describe how cells behave when worksheet protection is enabled. They do not encrypt a workbook. See [comments and notes](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/comments/llms-full.txt) and [protection](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/protection/llms-full.txt).

### Reporting: Turn a Worksheet Into a Reusable Template

![Reporting ribbon with clearly separated Insert Merge Field and Insert Merge Block captions, dropdown arrows, field properties and merge-block commands](https://docs.textcontrol.com/assets/img/tx-sheet-control/ribbon-reporting.1b2ef6c8.webp)

Connect sample JSON, insert a merge field into a selected cell or define a repeating block for a detail row:

- **Field Properties** adjusts the path and the value type of a field.
- **The repeating-block commands** map one template row, or a band of rows, to an array such as `items`.

The invoice example binds the customer name to `customer.name` and repeats the description, quantity and unit price for each invoice item. Formula cells calculate the line amounts and the final total. See the illustrated [mail merge workflow](https://docs.textcontrol.com/tx-sheet-control/mail-merge/overview/llms-full.txt).

### Table Design: Commands for the Selected Table

![Table Design ribbon for SalesData with the table name, Resize Table, Remove Duplicates, Convert to Range, the table style options and the Table Styles gallery](https://docs.textcontrol.com/assets/img/tx-sheet-control/ribbon-table.12ce752b.webp)

Click inside a table to show this contextual tab. Change the name and the range of the table, and choose the options for the header, totals, stripes, emphasis and filter buttons. The style gallery groups its presets under **Light**, **Medium** and **Dark**:

![Expanded table-style gallery showing the Light, Medium and Dark presets and the Clear command](https://docs.textcontrol.com/assets/img/tx-sheet-control/table-styles-gallery.b299c8cf.webp)

A table style changes the presentation of the table. It does not replace the formulas of calculated columns or convert the table to plain cells. You can change individual display options separately from the chosen style. See [Excel-style tables](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/tables/llms-full.txt).

### Chart Design: Commands for the Selected Worksheet Chart

![Chart Design ribbon with chart style, data, type and location commands: Change Colors, the Chart Styles gallery, Switch Row/Column, Select Data, Change Chart Type and Move Chart](https://docs.textcontrol.com/assets/img/tx-sheet-control/ribbon-chart-design.008b9cb8.webp)

Click a worksheet chart to show **Chart Design**. Choose its style and colors, switch the series orientation, select another source range, change the chart type or move the chart to another worksheet. **Select Data** and **Change Chart Type** open the shared chart dialog with the current settings.

A worksheet chart and a dashboard chart are authored in different ways: worksheet charts use the [chart dialogs](https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/chart-dialogs/llms-full.txt), and dashboard charts use [Widget Settings](https://docs.textcontrol.com/tx-sheet-control/dashboards/widget-settings/llms-full.txt).

### Header & Footer: Edit the Page Furniture

![Header and Footer contextual ribbon while editing the center page header: Go to Header, Go to Footer, Close Editing, the header and footer elements and the options for first, odd and even pages, scaling and margins](https://docs.textcontrol.com/assets/img/tx-sheet-control/ribbon-header-footer.9cd585f1.webp)

In Page Layout view, click a header or footer area to enter its editor and show this tab. Insert supported page fields and configure the header and footer variations you need. For example, page-number fields are evaluated for each printed page rather than stored as one fixed number in a worksheet cell.

Finish editing the header or footer before you return to cell editing. Pagination and export are covered in [page layout and printing](https://docs.textcontrol.com/tx-sheet-control/pdf/page-layout/llms-full.txt).

### Dashboard: Design the Selected Dashboard

![Dashboard ribbon with Insert, Themes, Background, Default Card Style, Layout and Alignment and Settings groups](https://docs.textcontrol.com/assets/img/tx-sheet-control/ribbon-dashboard.5f9561be.webp)

Selecting a dashboard in design mode opens **Dashboard**. This tab contains commands for the whole dashboard: add or generate widgets, choose one of 24 Light, Medium or Dark themes from the categorized **Themes** gallery, change canvas colors and gradients, set default card appearance and arrange the widgets. **Widget Spacing** and **Grid Row Height** control the shared grid. **Dashboard Settings** opens the complete settings dialog for section containers, parameters and detailed gradients.

Theme defaults apply to widgets that inherit them. An individual widget's appearance overrides those defaults. Use **Reset Individual Widget Appearance** in Dashboard Settings when every widget should inherit the same theme.

### Widget Format: Commands for the Selected Dashboard Widget

![Widget Format contextual ribbon for a chart, with widget commands, data and visualization, shared font and number controls, card styles and chart display options](https://docs.textcontrol.com/assets/img/tx-sheet-control/ribbon-widget-format.2bae438c.webp)

Select a widget on the canvas in design mode to open **Widget Format**. Use **Dashboard** to return to commands for the whole dashboard; switching ribbon tabs keeps the selected widget. Widget Format is unavailable when no widget is selected.

| Group | Common tasks |
|---|---|
| Widget | Open Widget Settings, duplicate the widget or remove it. |
| Data & Visualization | Change a chart's visualization or the query aggregation. |
| Format and Number | Change fonts, emphasis, text and fill colors and number formatting using the shared spreadsheet controls. |
| Card, Gradient and Display | Set border color and width, corner radius, shadow, a two-color gradient, title visibility and text alignment. |
| Chart Styles and Chart Options | Choose a palette, position the legend and toggle data labels, animation and gridlines. These groups appear for charts. |
| KPI | Set a target or choose a comparison measure already present in the widget query. This group appears for key metrics. |
| Date Filter | Choose a date range or searchable dates and the calendar granularity. This group appears for date filter widgets. |

Ribbon edits apply immediately and can be undone. **Widget Settings** keeps complex queries, comparison and trend queries, drill hierarchies, actions and metric choices together in a draft until you choose **Apply**. Gradient shortcuts use two color stops; the dialog supports additional stops and angle settings.

At narrower widths, groups collapse into buttons that open their existing controls. Use the arrow keys, Home and End to switch between focused ribbon tabs. View mode hides both authoring panels and the ribbon tab selector, while keeping permitted filtering and data exploration.

See [dashboard designer and viewer](https://docs.textcontrol.com/tx-sheet-control/dashboards/designer-viewer/llms-full.txt) and the [Widget Settings tour](https://docs.textcontrol.com/tx-sheet-control/dashboards/widget-settings/llms-full.txt).

### Accessibility Commands

The worksheet **Review** tab includes an **Accessibility** group. Each command has a distinct icon for its workflow: a worksheet and eye, worksheet objects, a keyboard and question mark, or an accessibility figure with a check. **Read Worksheet Data** presents formatted values in an HTML table; **Worksheet Objects** offers selection, chart data and size/position controls; **Keyboard Help** lists navigation commands; **Check Accessibility** reviews content alternatives and explicit text contrast. See [Keyboard and Accessibility](https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/keyboard/llms-full.txt) for the complete workflows.

### Show or Hide Editor Areas

A host application can show or hide areas of the editor with `editor.ui.areas`, the [areas](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/editorui/areas-property/llms-full.txt) property of [EditorUi](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/editorui/llms-full.txt). Hiding the ribbon or a tab area does not remove document data.

### Next Steps

- [Format Cells Dialog](https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/format-cells/llms-full.txt): combine number, alignment, font, border, fill and protection settings.
- [Chart Dialogs](https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/chart-dialogs/llms-full.txt): choose the type, data and legend of a worksheet chart.
- [Formula Designer](https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/formula-designer/llms-full.txt): find functions and build formulas with a result preview.
- [Widget Settings Dialog](https://docs.textcontrol.com/tx-sheet-control/dashboards/widget-settings/llms-full.txt): configure the data and appearance of a dashboard widget.
- [Events and Cancellation](https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/events/llms-full.txt): react to the edits users make with the ribbon.

---

## Nearby

- **Previous:** [Spreadsheet Editor Tour](https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/overview/llms-full.txt)
- **Next:** [Format Cells Dialog](https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/format-cells/llms-full.txt)
