Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ public void afterRowDispose(RowWriteHandlerContext context) {
columnIndex,
columnIndex + columnExtend - 1);
context.getWriteSheetHolder().getSheet().addMergedRegionUnsafe(cellRangeAddress);
} else {
// Iterate through the columns to clear the content of merged cells
for (int i = 0; i < columnExtend; i++) {
// Access the cell at the specified column index in the current row and set it to blank
context.getRow().getCell(columnIndex + i).setBlank();
Copy link

Copilot AI Sep 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential NullPointerException if getCell(columnIndex + i) returns null. The cell should be created if it doesn't exist before calling setBlank().

Copilot uses AI. Check for mistakes.
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ private void complexFill(File file, File template) {
}
List<Object> list = FastExcel.read(file).sheet().headRowNumber(3).doReadSync();
Assertions.assertEquals(list.size(), 21L);
Map<String, String> map19 = (Map<String, String>) list.get(19);
Assertions.assertEquals("Zhang San", map19.get(0));
Map<String, String> map18 = (Map<String, String>) list.get(18);
Assertions.assertEquals("Zhang San", map18.get(0));
}

private void fill(File file, File template) {
Expand Down