diff --git a/src/main/java/com/alibaba/excel/analysis/v07/XlsxSaxAnalyser.java b/src/main/java/com/alibaba/excel/analysis/v07/XlsxSaxAnalyser.java index 7e771a6f..329f5250 100644 --- a/src/main/java/com/alibaba/excel/analysis/v07/XlsxSaxAnalyser.java +++ b/src/main/java/com/alibaba/excel/analysis/v07/XlsxSaxAnalyser.java @@ -233,8 +233,8 @@ public class XlsxSaxAnalyser implements ExcelReadExecutor { return; } Iterator cellAddresses = commentsTable.getCellAddresses(); - for (Iterator it = cellAddresses; it.hasNext(); ) { - CellAddress cellAddress = it.next(); + while (cellAddresses.hasNext()) { + CellAddress cellAddress = cellAddresses.next(); XSSFComment cellComment = commentsTable.findCellComment(cellAddress); CellExtra cellExtra = new CellExtra(CellExtraTypeEnum.COMMENT, cellComment.getString().toString(), cellAddress.getRow(), cellAddress.getColumn());