for(Row row:sheet) {
for(int rowNo=0;rowNo<sheet.getLastRowNum();rowNo++) {
row=sheet.getRow(rowNo);
sheet.removeRow(row);
}
}
I am trying to remove the rows from Excel file through java but it is giving me error
java.util.ConcurrentModificationException at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1207) at java.util.TreeMap$ValueIterator.next(TreeMap.java:1252)