Cells can be merged across rows and columns with mergeCells option which is an array of objects where each object defines a single merged cell.

Each object has following properties:

If there is one or more intermediate hidden columns lying in the merged cell, visible/effective colspan gets reduced by same amount.

If there is one or more intermediate hidden rows lying in the merged cell, visible/effective rowspan gets reduced by same amount.

"E" column is hidden in this example.