Tutorial: Quick start

Quick start

Follow these steps to install Handsontable Community Edition:

  1. Install
  2. Create
  3. Initialize
  4. Alternative installation

Step 1: Install

There are many ways to install Handsontable CE but we suggest using npm. Just type in the following command:

npm install handsontable

After the installation process is finished, embed this code inside your HTML file:

<script src="/dist/handsontable.full.js"></script>

<link rel="stylesheet" media="screen" href="/dist/handsontable.full.css">

Step 2: Create

Add an empty <div> element that will be turned into a spreadsheet. Let's give this element an "example" ID.

<div id="example"></div>

Step 3: Initialize

In the next step, pass a reference to that <div id="example"> element and fill it with sample data:

var data = [
  ["", "Ford", "Tesla", "Toyota", "Honda"],
  ["2017", 10, 11, 12, 13],
  ["2018", 20, 11, 14, 13],
  ["2019", 30, 15, 12, 13]
];

var container = document.getElementById('example');
var hot = new Handsontable(container, {
  data: data,
  rowHeaders: true,
  colHeaders: true
});

Step 4: The result

That's it, now your Handsontable CE is up and ready to use:

You are probably wondering how to not only bind the data source but also save the changes made in Handsontable CE? Head to Binding data page to learn more about it.

Alternative installation

Find all the available installation options on the Download Handsontable CE page.

Help us improve this page