|
|
@@ -416,7 +416,9 @@ public class SupplyController extends BaseController {
|
|
|
Cell categoryCell = headerRow1.createCell(colIndex);
|
|
|
categoryCell.setCellValue(categoryNames[i]);
|
|
|
categoryCell.setCellStyle(headerStyle);
|
|
|
- sheet.addMergedRegion(new CellRangeAddress(1, 1, colIndex, colIndex + years.size() - 1));
|
|
|
+ if (years.size() > 1) {
|
|
|
+ sheet.addMergedRegion(new CellRangeAddress(1, 1, colIndex, colIndex + years.size() - 1));
|
|
|
+ }
|
|
|
|
|
|
for (int j = 0; j < years.size(); j++) {
|
|
|
Cell yearCell = headerRow2.createCell(colIndex + j);
|