Hi,

If i have a cell of type 0 (numeric), how can you distinguish between an
empty (blank) cell and a zero cell?

public boolean isCellEmpty(HSSFCell cell)
  {
    ...
    if (cell.getCellType() == cell.CELL_TYPE_NUMERIC)
    {
      double doubleVal = cell.getNumericCellValue();
      System.out.println("cell to string is " + cell.toString());
      System.out.println("cell double value is " + doubleVal);
      if (doubleVal == 0.0)
      {
        return true;
      }
...
    }

cell.toString() and cell.getNumericCellValue both equal 0.0 in both the case
when the cell is empty (blank) and when the cell contains '0'.


Thanks

Murray

Reply via email to