类 PoiMergeCellUtil
java.lang.Object
org.jeecgframework.poi.util.PoiMergeCellUtil
纵向合并单元格工具类
- 作者:
- JEECG
-
方法概要
修饰符和类型方法说明static voidaddMergedRegion(org.apache.poi.ss.usermodel.Sheet sheet, int firstRow, int lastRow, int firstCol, int lastCol) 处理合并的单元格区域static voidmergeCells(org.apache.poi.ss.usermodel.Sheet sheet, int startRow, Integer... columns) 纵向合并相同内容的单元格static voidmergeCells(org.apache.poi.ss.usermodel.Sheet sheet, Map<Integer, int[]> mergeMap, int startRow) 纵向合并相同内容的单元格static voidmergeCells(org.apache.poi.ss.usermodel.Sheet sheet, Map<Integer, int[]> mergeMap, int startRow, int endRow) 纵向合并相同内容的单元格
-
方法详细资料
-
mergeCells
public static void mergeCells(org.apache.poi.ss.usermodel.Sheet sheet, int startRow, Integer... columns) 纵向合并相同内容的单元格- 参数:
sheet-startRow- 开始行columns- 需要处理的列
-
mergeCells
public static void mergeCells(org.apache.poi.ss.usermodel.Sheet sheet, Map<Integer, int[]> mergeMap, int startRow) 纵向合并相同内容的单元格- 参数:
sheet-mergeMap- key--列,value--依赖的列,没有传空startRow- 开始行
-
mergeCells
public static void mergeCells(org.apache.poi.ss.usermodel.Sheet sheet, Map<Integer, int[]> mergeMap, int startRow, int endRow) 纵向合并相同内容的单元格- 参数:
sheet-mergeMap- key--列,value--依赖的列,没有传空startRow- 开始行endRow- 结束行
-
addMergedRegion
public static void addMergedRegion(org.apache.poi.ss.usermodel.Sheet sheet, int firstRow, int lastRow, int firstCol, int lastCol) 处理合并的单元格区域- 参数:
sheet-firstRow- 开始行lastRow- 结束行firstCol- 开始列lastCol- 结束列
-