Angular Spreadsheet Component | ng-hub-ui-spreadsheet
Editable Angular spreadsheet with Excel's keyboard, rectangular selection, a clipboard that round-trips with Excel, frozen panes and merged cells. MIT, accessible, no paid tier.
Last updated Nov 15, 2026
Overview
Why teams search for this library
Use ng-hub-ui-spreadsheet when a screen needs cells people type into and paste into, without paying for a grid or giving up screen-reader support.
Install
npm install ng-hub-ui-spreadsheetJump to
Ideal for
- invoice and order lines
- price and tariff grids
- timesheets and rotas
- bulk data correction
About spreadsheet
ng-hub-ui-spreadsheet is a standalone Angular component that renders rows and columns you already hold and reports what the reader did to them. It never writes to your data. It brings in-cell editing with Excel's keyboard, rectangular selection by shift or dragging, a clipboard that writes and reads both flavours so figures survive a journey between locales, frozen rows and columns, merged blocks, and a save state per cell. It carries real grid semantics — role="grid", row and column indices, a roving tab stop — and depends on nothing outside Angular: its grid primitives live in ng-hub-ui-utils rather than @angular/cdk. Formulas are written against the column aliases and against coordinates alike, a long sheet draws only what the viewport covers on both axes, and the whole thing goes out to a real .xlsx or to CSV and comes back in — with the zip and the XML written here, so none of it brings a dependency.
Feature guides
No feature guides have been documented yet for this library.
Key features
Recent changes
Version 22.13.0 - 11/15/26, 12:00 AM
added: hubSpreadsheetHeader draws a column's header title from a template of your own, such as a name with an edit button. A button, link or field inside it is pressed without dragging the column; the header keeps its width, freezing and check-all box.
Version 22.12.2 - 11/4/26, 12:00 AM
fixed: A figure left noisy by arithmetic reads as a spreadsheet shows it: numbers are written to 15 significant digits in the cell, in a copy and in the editor, so 3260.4 − 3120.8 shows 139.6. The stored value does not change.
Version 22.12.1 - 11/4/26, 12:00 AM
fixed: An end-aligned list or date column keeps a lane for its caret, in its cells and its header, so the caret no longer covers the end of the value.
fixed: A list keeps the same caret when it opens: the native list hides the browser's arrow and keeps the sheet's, in the same place.
Version 22.12.0 - 11/4/26, 12:00 AM
added: editCell opens a cell's editor from code, waiting for a row the host has just added, so a button that adds a note leaves the reader typing in it.
added: Alt+Enter (Option+Enter on a Mac) opens a cell that is also typed into, while Enter keeps opening its field.
Version 22.11.0 - 11/4/26, 12:00 AM
added: append on a column draws a second value after the main one, picked from a short list: a quantity's unit or a discount's kind. A change to it arrives as a commit keyed by append.key, and copy, paste and fill carry both parts.
Version 22.10.0 - 11/4/26, 12:00 AM
added: focusCell puts the cursor on a cell from code, waiting for a row the host has just added, so a button that adds a line leaves the reader ready to type in it.
added: Ctrl+D (Cmd+D on a Mac) fills down with fillHandle on: the top row of the selection into the rows below, reported as one filled.
added: A paste longer than the sheet asks for the rows it runs past through insertRequested, where structure allows it, and arrives whole once they are drawn.
added: checkAll puts a box in a yes/no column's header that ticks every row at once, shown mixed while the rows disagree, reported as one filled.
changed: A cell's title shows in the sheet's tooltip, on hover and from the keyboard, instead of a native title the keyboard never shows.
changed: A cell template keeps the cell's own controls: a yes/no column its box, with the template beside it, and a list or date column the arrow that opens it.
fixed: An empty row is as tall as a filled one, instead of shrinking to its padding.
fixed: A cell in a bottom corner of the frame follows its curve, so the cursor's outline no longer sticks out past it.
Version 22.9.1 - 11/3/26, 12:00 AM
changed: The sheet's labels use hubTranslate instead of the deprecated translate pipe. Nothing changes for the host.
Version 22.9.0 - 11/3/26, 12:00 AM
added: A row moves from the keyboard with Alt+Shift and the up or down arrow, reported through rowMoved like a drop, and a live region reads out where it went.
fixed: Keys typed into a supplied editor or into the open row are theirs: a picker's search box can be typed into, and the arrows move its caret instead of the cursor.
fixed: A supplied editor closes like the sheet's own, on Escape, on Tab and when the focus leaves it, and the Enter that picks an answer no longer opens the cell below. The context gains draft, for an editor with something to confirm.
fixed: Text a cell cannot store is no longer dropped when the reader leaves it: the cell keeps it, ringed and explained, and invalidDrafts tells the host.
Version 22.8.0 - 10/28/26, 12:00 AM
added: A row can be dragged to another place, as a column already could. Hovering a row shows a grip over its leading edge, and hovering a column shows one over its header. The drop is reported through rowMoved, already reordered, in the same shape as columnMoved.
changed: A move now shows what is happening: a copy follows the pointer, the rows or columns it passes step aside to open its slot, and the sheet scrolls near its edge. The grips hide while a button is held.
Version 22.7.0 - 10/27/26, 12:00 AM
changed: A cell validation message opens in a red tooltip, on hover or when the keyboard lands on the cell, instead of the grey browser title.
changed: Backspace or Delete on a single cell empties it into its editor, so the new value can be typed straight away. Several cells are still emptied through cleared.
changed: The cursor and the selection are drawn only while the sheet has the focus, so a sheet you have left no longer looks ready to type into.
added: Form fields opened inside a cell show their validation message in a tooltip, and the row keeps its height.
Version 22.6.0 - 9/30/26, 12:00 AM
added: A cell can say what it is empty of: placeholder is a hint shown in that cell while it is empty, on hover, falling back to the columns own.
Version 22.5.0 - 9/29/26, 12:00 AM
changed: hubSpreadsheetCellAction now also takes a function of the row, so a column can have only some of its cells open — which keeps Enter for those and leaves the rest to the sheet.
Version 22.4.0 - 9/28/26, 12:00 AM
added: A row opens in place, with expansion and expandedRow: a template drawn under the row itself for what it holds behind its figures, rather than in a dialog over it.
added: A cell that opens onto something, said by its own template: hubSpreadsheetCellAction keeps Enter for the cell, and the press is reported through opened.
added: Columns and rows fold by outline, the way Excel grouping works: a run of columns or rows at a level folds away with one toggle, and which groups are folded is yours.
Version 22.2.0 - 9/27/26, 12:00 AM
added: A cell worked out from a formula rather than typed carries a small fx in its top corner, shown while the pointer is on it. Two tokens of its own, --hub-spreadsheet-formula-bg and --hub-spreadsheet-formula-color.
fixed: The coordinates come out only for a formula. Editing a plain cell no longer draws a letters-and-numbers frame around it — they wait for the first =.
fixed: The coordinates are drawn outside the sheet frame. The frame shifts to make room and the badges float outside it, so the frame stays between them and the table.
fixed: The list of what can go into a formula follows the frame. Writing the first = moves the sheet, and the list is placed again once it has shifted, hanging off the cell where it now is.
Version 22.1.0 - 9/27/26, 12:00 AM
added: More than one block at a time: Ctrl-clicking keeps the rectangle being drawn and starts another, Delete empties every one of them, and selectionRangesChange reports them all. A copy only happens when the blocks make a table, and the fill handle is dropped while several are picked.
added: hub-spreadsheet-theme, one include for the sheet's 65 themeable tokens, with every parameter optional so only what you pass is emitted.
added: A formula is written in colour: while one is being written, a function, a column alias, a cell reference and a quoted string are each drawn in their own colour, so the grammar reads at a glance.
added: Point at cells to write their reference: while a formula is being written, pressing or dragging across other cells puts what was pointed at into the formula at the caret — B3 for one, B3:D7 for a rectangle — without committing the text.
added: Column letters and row numbers come out while a cell is open: the table shifts a touch and into the room float badges — a column's letter and the alias a formula calls it by over the header, the row's number down the leading edge — so a reference can be read off the sheet instead of counted, with a short animation as they arrive.
fixed: Theming the sheet from outside it works at all now. The tokens were declared on the host element, which beats anything inherited, so :root, a wrapper class and a route-level theme were silently ignored. They are read where they are used now, and the defaults are unchanged.
fixed: The list of what can go into a formula is actually seen now. It existed but was clipped by the sheet scroll area and by any overflow:hidden between the cell and the page, so on the last row it never appeared. It is fixed to the window now, and opens above the cell when there is no room below.
Version 22.0.0 - 9/27/26, 12:00 AM
added: hub-spreadsheet: in-cell editing, full keyboard navigation and rectangular selection.
added: A clipboard that round-trips with Excel in both directions, reading the raw number out of the HTML flavour.
added: Frozen rows and columns, counted from the edge.
added: Merged blocks, declared by the owner, treated as one cell by navigation and selection.
added: Insert and delete requests, gated by permissions, with aliases that are never reused.
Related libraries
Frequently asked questions
How do I paste from Excel into an Angular grid without breaking numbers?
Read the HTML flavour of the clipboard, not only the plain text. Excel writes the raw number in an attribute there; the plain text carries whatever the source locale displayed, so 1.234,56 parses as text or as 1.23 depending on where it was copied. ng-hub-ui-spreadsheet reads both and prefers the raw value.
Is there a free Angular spreadsheet component?
ng-hub-ui-spreadsheet is MIT with no paid tier and no gated features. Editing, rectangular selection, the clipboard, frozen panes and merged cells are all in the package, which is not the case for most grids, where the clipboard and range selection sit behind an enterprise licence.
Does it work with a screen reader?
Yes. It renders a real role="grid" with per-cell aria-colindex, per-row aria-rowindex, aria-selected following the selection, aria-readonly on cells that cannot be typed into and aria-busy while a cell saves, with one roving tab stop and arrow-key navigation.
Does it need @angular/cdk?
No. The two-dimensional navigation, the rectangular selection and the keyboard map live in ng-hub-ui-utils, so installing the spreadsheet brings nothing outside Angular itself.