8
异常代码
ERROR c.a.c.e.h.GlobalExceptionHandler - java.lang.IllegalStateException: Cannot add merged region A1:P1 to sheet because it overlaps with an existing merged region (A1:P1).
这里写你的代码
```public class CustomTiaozhaCellWriteHandler implements CellWriteHandler {
@Override
public void afterCellDispose(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder,
List<CellData> cellDataList, Cell cell, Head head, Integer relativeRowIndex, Boolean isHead) {
// TODO Auto-generated method stub
if (!isHead && cell.getRowIndex() == 1 && cell.getColumnIndex() == 3 ) {
Sheet sheet = writeSheetHolder.getSheet();
CellRangeAddress cellAddresses = new CellRangeAddress(0,0,0,3);
sheet.addMergedRegion(cellAddresses);
}
}
}
**异常提示**
请提供完整的异常提示,记住是全部异常!
我想通过单元格销毁后,直接自己指定合并哪行哪列!
**建议描述**