A data grid
that works like Excel
A grid for business screens. Draw 100,000 rows instantly, edit cells, and paste tables copied from Excel as they are. Plain TypeScript with no external libraries.
The grid below is not a picture; it is the real grid with 10,000 rows. Click a cell and move with the arrow keys, type a number in a monthly cell, or paste numbers copied from Excel. Click a header to sort, drag it to move, right-click for the menu.
import { createGrid } from 'horee-grid'
// 10,000 rows × 12 months. Quarter header groups, left/right fixed columns, total row, editable cells (monthly amounts · memo)
const depts = ['Sales', 'Production', 'R&D', 'Admin', 'Purchasing']
const rows = Array.from({ length: 10000 }, (_, i) => {
const r = { id: i + 1, code: String(41000 + i), name: `Account ${i + 1}`, dept: depts[i % 5], memo: '' }
for (let m = 1; m <= 12; m++) r['m' + m] = ((i * 7919 + m * 104729) % 900000) + 1000
r.total = sum(r)
return r
})
function sum(r) {
let s = 0
for (let m = 1; m <= 12; m++) s += r['m' + m] || 0
return s
}
const month = m => ({ field: 'm' + m, title: new Date(2026, m - 1).toLocaleString('en', { month: 'short' }), type: 'number', width: 96, editable: true })
const grid = createGrid(host, {
locale: 'en',
rowKey: 'id',
selection: 'multi',
columns: [
{ field: 'code', title: 'Code', width: 90, fixed: 'left' },
{ field: 'name', title: 'Account', width: 120, fixed: 'left' },
{ field: 'dept', title: 'Dept.', width: 110, align: 'center' },
...[1, 2, 3, 4].map(q => ({ title: `Q${q}`, children: [3 * q - 2, 3 * q - 1, 3 * q].map(month) })),
{ field: 'memo', title: 'Memo', width: 180, editable: true },
{ field: 'total', title: 'Total', type: 'number', width: 120, fixed: 'right' }
],
rows,
bottomRows: [{ name: 'Total', total: rows.reduce((s, r) => s + r.total, 0) }],
// When a monthly amount changes, recalculate and redraw that row's total
onCellChange: ({ row }) => {
row.total = sum(row)
grid.refreshRow(row)
grid.setBottomRows([{ name: 'Total', total: rows.reduce((s, r) => s + r.total, 0) }])
}
})What is different
Feels like Excel
Active cell, arrow keys, type to edit, range selection, Ctrl+C · Ctrl+V. Users have nothing new to learn.
Built with IME input in mind
Typing Korean, Japanese or Chinese straight into a cell never loses the first character. A hidden input sits on the active cell, so composition is never broken.
Zero dependencies
Even Excel reading and writing use only browser features (CompressionStream, DOMParser). No third-party licenses or security advisories to track.
Draws only what you see
Virtual scrolling for rows and columns. Even with 100,000 rows × 20 columns, only about 450 cells exist on screen.
Server paging
Scroll down and the next batch is fetched and appended. Sort and filter conditions are passed to the server as they are.
What business screens need
Grouped headers, left/right fixed columns, total rows, change tracking, saved personal layouts, Excel download and upload are all built in.
Features at a glance
| Area | What is included |
|---|---|
| Drawing | Row and column virtual scrolling, left/right fixed columns, multi-level grouped headers, fixed bottom rows (totals), row numbers, empty-list text |
| Columns | Resize, drag to reorder, hide, share leftover width (flex), number and date formats, custom drawing (render), tooltips |
| Sort · Filter | Click to sort, Shift+click multi-sort, right-click grid filter (11 conditions such as equals, contains, comparisons), row filter function |
| Selection | Single or multiple (checkbox) row selection, current-row marker, range selection |
| Editing | Text, number, date, select and check editors, per-row editability, validation, change marks and change list |
| Clipboard | Tab-separated copy, cut and paste that round-trips with Excel, fill a range from one cell, paste result report |
| Excel | .xlsx download (merged group headers, frozen panes, formats), .xlsx reading |
| Server data | Fetch while scrolling, server sort and filter, total count and total rows, loading indicator |
| Personalization | Get and apply column order, width, visibility, sort and filters as one state, applied marker |
| Look | Colors, fonts and row height with CSS variables (--hg-*), 3 cell line styles, row and cell classes |
| Languages | Menus, dialogs and license notice in 6 built-in languages (locale), custom texts (texts) |
| License | Domain + expiry key, checked offline, never stops working without a key (watermark only) |
When it fits, when it does not
horee-grid was built for business screens such as ERP, accounting and inventory. It is not a general-purpose table library.
| Good fit | Not a good fit |
|---|---|
| Entry screens where users edit and paste cells like in Excel | Screens built around expandable trees, groups or pivots (not in this version) |
| Lists of tens or hundreds of thousands of rows, or server-paged lists | Lists with long text or images per cell and varying row heights (row height is fixed) |
| Accounting-style tables with grouped headers, fixed columns and total rows | Simple tables on public websites (a light <table> is better) |
| In-house systems where adding external dependencies is hard | Spreadsheets that need cell formulas |
Design principles
- Framework-agnostic. The core takes one DOM element and draws inside it. The same API works in Vue, React or plain JS.
- The data belongs to your screen. The grid writes values directly into the row objects you pass and notifies you. Saving, validation and server calls are up to your screen.
- No silent changes. Invalid values are rejected and the cell stays in edit mode. Skipped cells, invalid values and overflowing lines from a paste are all returned as a result.
- Six languages built in. Menus, dialogs, the empty-list text and the license notice come in Korean, English, Japanese, Chinese, Spanish and Portuguese; choose with the
localeoption. Change individual texts withtexts.
Supported browsers
| Browser | Minimum version |
|---|---|
| Chrome · Edge | 111 |
| Firefox | 113 |
| Safari | 16.4 |
This is because the grid uses color-mix() in CSS and CompressionStream. Internet Explorer is not supported. License key checks work only over https (a secure connection). localhost needs no key.
With the obfuscated bundle customers receive, 100,000 rows × 20 columns (mixed numbers and text) in headless Chrome (a 1200 × 600 grid). First draw = from createGrid to the first layout; scrolling = median redraw time over 60 jumps to random positions (95th percentile 15–19 ms). Under the same conditions sorting takes about 70 ms and a contains filter about 120 ms. Results vary by PC.