Commit 5bb13a26 authored by yanzg's avatar yanzg

设置单元格合并样式

parent 850b489b
...@@ -231,6 +231,7 @@ public class ExcelConsole<T extends Object> implements DbRow<T> { ...@@ -231,6 +231,7 @@ public class ExcelConsole<T extends Object> implements DbRow<T> {
// 这里是合并excel中多列为1列 // 这里是合并excel中多列为1列
CellRangeAddress region = new CellRangeAddress(rowIndex, rowIndex, 0, columnLength); CellRangeAddress region = new CellRangeAddress(rowIndex, rowIndex, 0, columnLength);
sheet.addMergedRegion(region); sheet.addMergedRegion(region);
setDefaultStyle(region, defaultStyle);
} }
/** /**
...@@ -260,6 +261,7 @@ public class ExcelConsole<T extends Object> implements DbRow<T> { ...@@ -260,6 +261,7 @@ public class ExcelConsole<T extends Object> implements DbRow<T> {
CellRangeAddress region = new CellRangeAddress(rowStart, rowEnd, columnStart, columnEnd); CellRangeAddress region = new CellRangeAddress(rowStart, rowEnd, columnStart, columnEnd);
sheet.addMergedRegion(region); sheet.addMergedRegion(region);
setDefaultStyle(region, defaultStyle);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment