title: How to get an Excel Blank Cell Value in Apache POI?
body: <p>I have a huge excel file with tons of columns which looks like this :-</p>
  
  <pre><code>Column1 Column2 Column3 Column4 Column5
  abc             def             ghi
          mno             pqr
  ......
  </code></pre>
  
  <p>This is the code that I wrote to print these values:</p>
  
  <pre><code>try {
      FileInputStream inputStr = new FileInputStream(fileName);
      XSSFWorkbook xssfWork = new XSSFWorkbook(inputStr) ;
      XSSFSheet sheet1 = xssfWork.getSheetAt(0);
      Iterator rowItr = sheet1.rowIterator();
  
      while ( rowItr.hasNext() ) {
          XSSFRow row = (XSSFRow) rowItr.next();
          System.out.println("ROW:--&gt;");
          Iterator cellItr = row.cellIterator();
  
          while ( cellItr.hasNext() ) {
              XSSFCell cell = (XSSFCell) cellItr.next();
              System.out.println("CELL:--&gt;"+cell.toString());
          }
      }
  } catch (Exception e) {
      e.printStackTrace();
  }
  </code></pre>
  
  <p>The output generated by this code is :-</p>
  
  <pre><code>ROW:--&gt;
  CELL:--&gt;Column1
  CELL:--&gt;Column2
  CELL:--&gt;Column3
  CELL:--&gt;Column4
  CELL:--&gt;Column5
  ROW:--&gt;
  CELL:--&gt;abc
  CELL:--&gt;def
  CELL:--&gt;ghi
  ROW:--&gt;
  CELL:--&gt;mno
  CELL:--&gt;pqr
  </code></pre>
  
  <p>So, If we look at the output above we can note that the cells where I left blank values was not picked up by the POI library , is there a way in which I can get these values as null. or a way to recognize that the values presented skipped blank cells?</p>
  
  <p>Thanks.</p>