ag-grid and handsontable are powerful JavaScript components for handling tabular data. ag-grid is designed for high-performance data grids, focusing on sorting, filtering, and aggregating large datasets efficiently. handsontable provides a spreadsheet-like interface, emphasizing data editing, formulas, and Excel compatibility for input-heavy workflows.
Both ag-grid and handsontable are mature solutions for displaying tabular data in web applications, but they solve different problems. ag-grid acts as a high-performance data grid for viewing and analyzing information, while handsontable mimics a spreadsheet for heavy data entry. Let's compare how they handle real-world engineering challenges.
ag-grid offers a robust Community version under the MIT license.
// ag-grid: Community version needs no key
import { AgGridReact } from 'ag-grid-react';
// 'ag-grid-community' package is free
// ag-grid: Enterprise version requires key
import { LicenseManager } from 'ag-grid-enterprise';
LicenseManager.setLicenseKey('your_license_key');
handsontable requires a license key for most commercial use cases.
// handsontable: License key required for commercial use
import { HotTable } from '@handsontable/react';
const settings = {
data: myData,
licenseKey: 'your_license_key' // Required for production
};
<HotTable settings={settings} />
ag-grid uses row virtualization by default.
// ag-grid: Handles large datasets automatically
const gridOptions = {
rowData: largeDataset, // 100,000 rows
columnDefs: columns,
// Virtualization is on by default
};
<AgGridReact {...gridOptions} />
handsontable also supports virtualization but can be heavier.
// handsontable: Virtualization settings
const settings = {
data: largeDataset,
rowHeights: 23, // Fixed heights help performance
viewportRowRenderingRatio: 1.5 // Controls buffer
};
<HotTable settings={settings} />
ag-grid focuses on structured cell editing.
// ag-grid: Column-specific editors
const columnDefs = [
{
field: 'status',
cellEditor: 'agSelectCellEditor',
cellEditorParams: { values: ['Active', 'Inactive'] }
}
];
<AgGridReact columnDefs={columnDefs} rowData={rowData} />
handsontable supports Excel-like editing out of the box.
// handsontable: Spreadsheet features
const settings = {
data: myData,
formulas: { engine: HyperFormula }, // Enable formulas
mergeCells: true, // Allow cell merging
copyPaste: true // Excel-compatible copy/paste
};
<HotTable settings={settings} />
ag-grid provides dedicated packages for each framework.
// ag-grid: React specific package
import { AgGridReact } from 'ag-grid-react';
function MyGrid() {
return <AgGridReact columnDefs={cols} rowData={rows} />;
}
handsontable wraps the core JS library in framework components.
HotTable or HotColumn components.// handsontable: React specific package
import { HotTable } from '@handsontable/react';
function MySheet() {
return <HotTable settings={{ data: rows }} />;
}
ag-grid uses CSS variables and built-in themes.
// ag-grid: Applying themes
import 'ag-grid/styles/ag-grid.css';
import 'ag-grid/styles/ag-theme-alpine.css';
<div className="ag-theme-alpine">
<AgGridReact {...props} />
</div>
handsontable relies on CSS classes and custom renderers.
// handsontable: Custom cell renderer
const settings = {
data: myData,
cells: function (row, col) {
const cellProperties = {};
if (row === 0) {
cellProperties.renderer = boldRenderer; // Custom function
}
return cellProperties;
}
};
<HotTable settings={settings} />
While their goals differ, both libraries share core capabilities for tabular data.
// ag-grid: Updating row data
gridApi.setRowData(newData);
// handsontable: Updating data
hotInstance.loadData(newData);
// ag-grid: Enable filtering
const colDef = { field: 'name', filter: true };
// handsontable: Enable filtering
const settings = { filters: true, dropdownMenu: true };
// ag-grid: Touch support enabled by default
// No extra config needed for basic touch
// handsontable: Touch support
const settings = {
touchScrollSpeed: 100 // Adjust scroll speed
};
// ag-grid: Typed column definitions
const cols: ColDef[] = [{ field: 'name' }];
// handsontable: Typed settings
const settings: Handsontable.settings = { data: [] };
// ag-grid: Community modules
import { StatusCellRenderer } from './custom-renderers';
// handsontable: Community plugins
import { HyperFormula } from 'hyperformula';
| Feature | Shared by AG Grid and Handsontable |
|---|---|
| Core Tech | ๐ JavaScript/TypeScript |
| Rendering | โก Virtualization support |
| Interaction | ๐ Sorting, Filtering, Selection |
| Frameworks | ๐งฉ React, Angular, Vue wrappers |
| Mobile | ๐ฑ Touch interaction support |
| Types | ๐ก๏ธ Strong TypeScript definitions |
| Feature | ag-grid | handsontable |
|---|---|---|
| License | ๐ฐ Free Community / Paid Enterprise | ๐ฐ Commercial License Required |
| Primary Use | ๐ Data Display & Analysis | ๐ Data Entry & Spreadsheets |
| Editing | โ๏ธ Structured Cell Editors | ๐งฎ Formulas & Excel-like Editing |
| Performance | ๐ Optimized for 100k+ rows | ๐ข Better for smaller datasets |
| Features | ๐ฒ Row Grouping (Enterprise) | ๐ Cell Merging & Formulas |
| Theming | ๐จ Built-in Themes | ๐๏ธ Manual CSS Customization |
ag-grid is like a high-speed data viewer ๐ โ perfect for dashboards, admin panels, and reporting tools where you need to process large amounts of information quickly. The free Community version makes it accessible for almost any project.
handsontable is like a web-based Excel sheet ๐ โ ideal for applications where users need to calculate, merge cells, and manipulate data directly. It shines in financial tools or configuration screens where editing is the main goal.
Final Thought: If your users need to read data, pick ag-grid. If your users need to calculate and edit data like a spreadsheet, pick handsontable. Both are robust choices โ just match them to your workflow.
Choose handsontable if your application requires complex data entry with spreadsheet features like formulas, cell merging, and copy-paste from Excel. It is best for financial models, configuration tools, and apps where users expect an Excel-like experience.
Choose ag-grid if you need to display large volumes of data with advanced filtering and sorting without licensing costs. It is ideal for analytics dashboards, reporting tools, and read-heavy interfaces where performance is critical.
Use it with JavaScript, TypeScript, or frameworks such as React, Angular, and Vue. With its spreadsheet-like editing features, itโs perfect for building data-rich internal apps. It allows users to enter, edit, validate, and process data from various sources. Common use cases include resource planning software (ERP), inventory management systems, digital platforms, and data modeling applications.
Website ย ย โย ย Documentation ย ย โย ย Themes ย ย โย ย API ย ย โย ย Community
ย ย โ
ย Built-in themes
ย ย โ
ย Flexible API
ย ย โ
ย Virtualization
ย ย โ
ย IME support
ย ย โ
ย Internationalization
ย ย โ
ย RTL support
ย ย โ
ย Accessibility
ย ย โ
ย Keyboard shortcuts
ย ย โ
ย Sorting data
ย ย โ
ย Filtering data
ย ย โ
ย 400 built-in formulas
ย ย โ
ย Configurable selection
ย ย โ
ย Data validation
ย ย โ
ย Conditional formatting
ย ย โ
ย Merged cells
ย ย โ
ย Frozen rows and columns
ย ย โ
ย Hiding rows and columns
ย ย โ
ย Right-click context menu
ย ย โ
ย Server-side data
ย ย โ
ย Notifications
ย ย โ
ย Export to Excel
Below, you'll find the installation guide for the JavaScript component. If you're using a specific framework, refer to its dedicated wrapper for installation instructions:
You can also use Yarn, NuGet or load the package from CDN.
npm install handsontable
<!-- Set the container's ID -->
<div id="handsontable-grid"></div>
import Handsontable from 'handsontable';
const element = document.getElementById('handsontable-grid');
new Handsontable(element, {
data: [
{ company: 'Tagcat', country: 'United Kingdom', rating: 4.4 },
{ company: 'Zoomzone', country: 'Japan', rating: 4.5 },
{ company: 'Meeveo', country: 'United States', rating: 4.6 },
],
columns: [
{ data: 'company', title: 'Company', width: 100 },
{ data: 'country', title: 'Country', width: 170, type: 'dropdown', source: ['United Kingdom', 'Japan', 'United States'] },
{ data: 'rating', title: 'Rating', width: 100, type: 'numeric' },
],
rowHeaders: true,
navigableHeaders: true,
tabNavigation: true,
multiColumnSorting: true,
headerClassName: 'htLeft',
licenseKey: 'non-commercial-and-evaluation',
});
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Handsontable - JavaScript Data Grid Example</title>
</head>
<body>
<div id="handsontable-grid"></div>
<script src="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.js"></script>
<script>
const element = document.getElementById("handsontable-grid");
new Handsontable(element, {
data: [
{ company: "Tagcat", country: "United Kingdom", rating: 4.4 },
{ company: "Zoomzone", country: "Japan", rating: 4.5 },
{ company: "Meeveo", country: "United States", rating: 4.6 },
],
columns: [
{ data: "company", title: "Company", width: 100 },
{ data: "country", title: "Country", width: 170, type: "dropdown", source: ["United Kingdom", "Japan", "United States"] },
{ data: "rating", title: "Rating", width: 100, type: "numeric" },
],
rowHeaders: true,
navigableHeaders: true,
tabNavigation: true,
multiColumnSorting: true,
headerClassName: "htLeft",
licenseKey: "non-commercial-and-evaluation",
});
</script>
</body>
</html>
Handsontable is a data grid component written in JavaScript, not a spreadsheet. However, it brings in many features typically found in spreadsheet software. We designed it this way because spreadsheet-like patterns are often the most user-friendly when it comes to data entry and management.
div) or windowAt first glance, it might seem that a data table, spreadsheet, and data grid are just different names for the same thing - an interactive table displaying data. In reality, these tools serve different purposes and offer distinct functionalities, designed to meet specific needs. Handsontable sits comfortably in the data grid category while incorporating many of the best aspects of spreadsheet software.
We're here to help!
If you're using Handsontable with a free, non-commercial license, you can:
If you have a commercial license, feel free to contact us directly at support@handsontable.com or use our contact form.
Handsontable is available under two licensing options, allowing you to choose the one that best fits your needs. Each license comes with its own terms and conditions, as outlined below:
This license is available for non-commercial purposes such as teaching, academic research, or evaluation. It allows you to use Handsontable free of charge under the terms specified in the non-commercial license agreement.
Learn more here.
For commercial use, a paid license is required. This license includes support and maintenance to ensure you get the most out of Handsontable. The commercial license can be purchased directly from Handsoncode or through an authorized reseller. See the pricing page for details.
For projects covered by the free non-commercial license, simply use the phrase 'non-commercial-and-evaluation' as your license key.
If you're using Handsontable in a project that supports commercial activities, you'll need to purchase a license key at handsontable.com/pricing. You can find more details in our documentation.
Contributions are welcome, but before you make them, please read the Contributing Guide and accept the Contributor License Agreement.
Created and maintained by the Handsontable Team ๐
ยฉ 2012 - 2025 Handsoncode