POI合并单元格--CellRangeAddress

(POI合并单元格--CellRangeAddress

  • 目录
    • 概 述
      • 案例
  • 小结
  • 参考

LD is tigger forever,CG are not brothers forever, throw the pot and shine forever.
Modesty is not false, solid is not naive, treacherous but not deceitful, stay with good people, and stay away from poor people.
talk is cheap, show others the code and KPI, Keep progress,make a better result.
Survive during the day and develop at night。

目录

概 述

POI合并单元格–CellRangeAddress

案例

第一列合并中第三行到第五行

sheet.AddMergedRegion(new CellRangeAddress(2, 4, 0, 0));
POI合并单元格--CellRangeAddress_第1张图片

第二列合并中第三行到第五行

sheet.AddMergedRegion(new CellRangeAddress(2, 4, 1, 1));
POI合并单元格--CellRangeAddress_第2张图片

合并第二列到第三列以及第二行到第三行

sheet.AddMergedRegion(new CellRangeAddress(1, 2, 1, 2));

POI合并单元格--CellRangeAddress_第3张图片

第2行合并0到12的列的数据

sheet.AddMergedRegion(new CellRangeAddress(1, 1, 0, 12));
POI合并单元格--CellRangeAddress_第4张图片

小结

参考

资料和推荐阅读
1.链接: 参考资料.

你可能感兴趣的:(【Java语言】,java)