Hey!
Firstly, here's the code:
for (Row row : sheetToSearch) {
for (Cell cell : row) {
if(cell.toString().equals("Oladimeji")){
System.out.println("Found Oladimeji!!");
break;
} else {
System.out.println("Oladimeji not found....");
}
}
}
What this does is search through the an excel spreadsheet, looking for a name (which happens to be my surname!). It is located in the sheet once, and displays the relevant message when found. However, the loop does not exit as expected, and just keeps iterating.
Any ideas as to why?
Thanks!