Extracting spreadsheet cells using Apache POI
You could extract the content of inner loops to methods with speaking names.

E.g. You could introduce a method like 

public static void processSheet(Sheet sheet)
{
  if (sheet.getLastRowNum() &gt; 24) {
      Iterator&lt;Row&gt; rowIterator = sheet.iterator();
      while (rowIterator.hasNext()) {
        row = rowIterator.next();
  ...  

}


Within this method you can extract another method e.g. 

public static void processRow(Row row){
  for (int j = 23; j &lt; sheet.getLastRowNum(); j++) {
    if (row.getRowNum() == j) {
      if (row.getCell(1) == null || row.getCell(1).getCellType() == Cell.CELL_TYPE_BLANK) {
        break;
    ...       

}


And so on until you have only short methods with speaking names. This makes the code easier to read and understand.