Merge cells

To enable the merge cells feature, set the mergeCells option to be true or an array.

To initialize Handsontable with predefined merged cells, provide merged cells details in form of an array: mergeCells: [{row: 1, col: 1, rowspan: 2, colspan: 2}]

 
A
B
C
D
E
F
G
H
I
J
K
L
M
N
1
A1B1C1D1E1F1G1H1I1J1K1L1M1N1
2
A2B2C2D2E2F2G2H2I2J2K2L2M2N2
3
A3B3C3D3E3F3G3H3I3J3K3L3M3N3
4
A4B4C4D4E4F4G4H4I4J4K4L4M4N4
5
A5B5C5D5E5F5G5H5I5J5K5L5M5N5
6
A6B6C6D6E6F6G6H6I6J6K6L6M6N6
7
A7B7C7D7E7F7G7H7I7J7K7L7M7N7
8
A8B8C8D8E8F8G8H8I8J8K8L8M8N8
9
A9B9C9D9E9F9G9H9I9J9K9L9M9N9
10
A10B10C10D10E10F10G10H10I10J10K10L10M10N10
 
A
B
C
D
E
F
G
H
I
J
K
L
M
N
 
1
2
3
4
5
6
7
8
9
10
 

var container = document.getElementById('example1'),
  hot;

hot = new Handsontable(container, {
  data: Handsontable.helper.createSpreadsheetData(1000, 16),
  colWidths: [55, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47], // can also be a number or a function
  rowHeaders: true,
  colHeaders: true,
  contextMenu: true,
  mergeCells: [
    {row: 1, col: 1, rowspan: 3, colspan: 3},
    {row: 3, col: 4, rowspan: 2, colspan: 2}
  ]
});