当前位置:   article > 正文

poi合并单元格_poi-tl表格单元格合并

poi-tl表格单元格合并
CellRangeAddress cellRangeAddress = new CellRangeAddress(startRow, endRow, startCell, endCell);
        sheet.addMergedRegionUnsafe(cellRangeAddress);
    }
  • 1
  • 2
  • 3

譬如:
合并行时

CellRangeAddress cellRangeAddress = new CellRangeAddress(0, 2, 0, 0);
        sheet.addMergedRegionUnsafe(cellRangeAddress);
    }
  • 1
  • 2
  • 3

合并列时

CellRangeAddress cellRangeAddress = new CellRangeAddress(0, 0, 0, 2);
        sheet.addMergedRegionUnsafe(cellRangeAddress);
    }
  • 1
  • 2
  • 3
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/606885
推荐阅读
相关标签
  

闽ICP备14008679号