https://issues.apache.org/bugzilla/show_bug.cgi?id=53799
Priority: P2 Bug ID: 53799 Assignee: dev@poi.apache.org Summary: Can't Remove Comments when the number of comments more than 54 Severity: normal Classification: Unclassified OS: Windows XP Reporter: tony810...@hotmail.com Hardware: PC Status: NEW Version: 3.8 Component: HSSF Product: POI I wanted to remove all comments in my workbook, but exception was thrown. my code as follow, ------------- for (int i = sheet.getLastRowNum() ; i >=0 ; i --) { Row row = sheet.getRow(i) ; if (row == null) { continue ; } for (int j = row.getLastCellNum() ; j >= 0 ; j --) { org.apache.poi.ss.usermodel.Cell c = row.getCell(j) ; if (c == null) { continue ; } c.removeCellComment() ; row.removeCell(c) ; } sheet.removeRow(row) ; } -------------------- when the number of comments in .xls more than 60 or more, will throw exception as follow ----------------------- //HSSFCell, line is 1065 throw new IllegalStateException("Found the wrong records before the TextObjectRecord, can't remove comment"); ---------------------- is any firend can help? thanks~~~~ -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org