title: Why "cellIterator.hasNext()" is getting "TRUE" even though cell has empty value
body: <p>consider below screenshot of my excelSheet</p>
  
  <p><a href="https://i.stack.imgur.com/DtPX1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DtPX1.png" alt="enter image description here"></a></p>
  
  <p>Now consider below code, which will iterate every row then iterate every cell and then print cell value.</p>
  
  <pre><code>public void excelData2(int sheetNo) {
      Iterator&lt;Row&gt; rowIterator = workbook.getSheetAt(sheetNo).rowIterator();
      while (rowIterator.hasNext()) {
          Row row = rowIterator.next();
  
          Iterator&lt;Cell&gt; cellIterator = row.cellIterator();
          while (cellIterator.hasNext()) {
              Cell cell = cellIterator.next();
              String cellValue = dataFormatter.formatCellValue(cell);
              System.out.print(cellValue + "\t");
          }
          System.out.println();
      }
  }
  </code></pre>
  
  <p>Actually by looking at excel sheet we can see there are 2 rows and 1 column right!!. </p>
  
  <p>So, the first <code>while</code> loop is iterating two times as expected :) , but inner <code>while</code> loop which is <code>cellIterator</code> is looping 26 times instead of 1 time even though next cell's has no value in it. Ideally when in 2nd iteration <code>cellIterator.hasNext()</code> should give false right? why it is giving true value till 26 times? anyone have idea?</p>
  
  <p><strong>Note:</strong> I don't want to put condition like <code>isEmpty()</code> or <code>==""</code> etc.</p>
  
  <p><strong>Note2:</strong> I have another solution in my mind i can go with that. But i want to know why this is happening. </p>