code: public void setCellMerge(final Table table, final TableAppender appender, final int rowIndex,
                               final int colIndex, final int rowCount, final int colCount)
              throws IOException {
          final TableRow row = this.getRowSecure(table, appender, rowIndex, true);
          final TableCell firstCell = row.getOrCreateCell(colIndex);
          if (firstCell.isCovered()) // already spanned
              return;
  
          firstCell.markColumnsSpanned(colCount);
          firstCell.markRowsSpanned(rowCount);
          row.coverRightCells(colIndex, colCount);
          for (int r = rowIndex + 1; r < rowIndex + rowCount; r++) {
              final TableRow otherRow = this.getRowSecure(table, appender, r, false);
              otherRow.coverRightCells(colIndex-1, colCount+1);
          }
      }
docs: Merge cells
  
  @param table       the table
  @param appender    the appender
  @param rowIndex    the start row
  @param colIndex    the start column
  @param rowCount    number of rows
  @param colCount number of cols
  @throws IOException if an I/O error occurs