public static Object getCellData(Cell cell){
CellType cellType = cell.getType();
Object data = null;
if(cellType == CellType.DATE || cellType == CellType.DATE_FORMULA){
data = ((DateCell)cell).getDate();
} else if (cellType == CellType.NUMBER || cellType == CellType.NUMBER_FORMULA){
data = Double.valueOf(((NumberCell)cell).getValue());
}else if (cellType == CellType.LABEL || cellType == CellType.STRING_FORMULA){
data = ((LabelCell)cell).getString();
} else if (cellType == CellType.BOOLEAN || cellType == CellType.BOOLEAN_FORMULA){
data = Boolean.valueOf(((BooleanCell)cell).getValue());
} else if (cellType == CellType.EMPTY || cellType == CellType.ERROR || cellType == CellType.FORMULA_ERROR) {
data = null;
}
return data;
}
CellType cellType = cell.getType();
Object data = null;
if(cellType == CellType.DATE || cellType == CellType.DATE_FORMULA){
data = ((DateCell)cell).getDate();
} else if (cellType == CellType.NUMBER || cellType == CellType.NUMBER_FORMULA){
data = Double.valueOf(((NumberCell)cell).getValue());
}else if (cellType == CellType.LABEL || cellType == CellType.STRING_FORMULA){
data = ((LabelCell)cell).getString();
} else if (cellType == CellType.BOOLEAN || cellType == CellType.BOOLEAN_FORMULA){
data = Boolean.valueOf(((BooleanCell)cell).getValue());
} else if (cellType == CellType.EMPTY || cellType == CellType.ERROR || cellType == CellType.FORMULA_ERROR) {
data = null;
}
return data;
}