title: How to handle an empty numeric cell in POI
body: <p>Is there any particular reason POI creates a numeric cell when in fact, it's actually empty? What happens is that by the time I get to that cell I obviously get an runtime error as I can't get the string value (it's a numeric cell, after all) and I can't get the numeric value either (can't get a number from an empty string) so my 2 questions would be: </p>
  
  <ol>
  <li>How does POI got there?</li>
  <li>Is there any way I can handle this scenario without having to explicitly go to my excel file?</li>
  </ol>
  
  <p>UPDATE I:
  After reading / parsing my excel file, POI generates the following XML for this particular cell:</p>
  
  <pre><code>  &lt;x:c r="AA2" t="n"&gt;
        &lt;x:v/&gt;
    &lt;/x:c&gt;
  </code></pre>
  
  <p>My method is something like this:</p>
  
  <pre><code>    final FileInputStream inputStream = new FileInputStream(new File("PATH/TO/FILE.xml"));
      final XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
      final XSSFSheet sheet = workbook.getSheet("SHEET_NAME");
  
      final int columnCount = sheet.getRow(0).getLastCellNum();
      for (int rowNumber = 0; rowNumber &lt;= sheet.getLastRowNum(); rowNumber++)
      {
          final XSSFRow row = sheet.getRow(rowNumber);
          for (int column = 0; column &lt; columnCount; column++)
          {
              // By now my cell would throw an exception if I attempt cell.getStringCellValue() or cell.getNumericCellValue() as cell.getCellType() returns "0" / NUMERIC
              final XSSFCell cell = row.getCell(column);
              ...
          }
      }
  </code></pre>
  
  <p>I was thinking about adding an additional validation to determine whether the cell is empty by using the getRawValue() method, but not sure if there's a better way to handle this as it was obviously wrongly parsed.</p>
  
  <p>UPDATE II
  I've been able to reproduce this scenario by doing adding this as part of a unit test (I still don't understand why POI would fall into this scenario though):</p>
  
  <pre><code>    final XLSXSheetConverterImpl xlsxSheetConverter = new XLSXSheetConverterImpl();
      xlsxSheetConverter.setSheetName(SHEET_NAME);
      xlsxSheetConverter.setFilePrefix(FILE_PREFIX);
  
      XSSFWorkbook workbook = new XSSFWorkbook();
      final XSSFSheet sheet = workbook.createSheet(SHEET_NAME);
  
      final XSSFRow row = sheet.createRow(0);
      XSSFCell cell = row.createCell(0);
      final CTCellImpl ctCell = (CTCellImpl) cell.getCTCell();
      ctCell.setT(STCellType.N);
      ctCell.setV("");
  </code></pre>
  
  <p>Thanks in advance!</p>