代码: sheet.addMergedRegion(new CellRangeAddress(firstRow, lastRow, firstCol, lastCol)); CellRangeAddress(int firstRow, int lastRow, int firstCol, int lastCol) 参数:起始行号,终止行号, 起始列号,终止列号