Apache POI Time Cell
问题 I need to detect, whether cell format is Date, Time or Datetime. My code is: if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC) { if (DateUtil.isCellDateFormatted(cell)) { if ( ??? ) return "Time"; else if ( ??? ) return "Date"; else return "Datetime"; } } I use ApachePOI 3.6 回答1: I don't see a built-in way to do this easily in POI. First, there doesn't seem to be a clear distinction between "Time", "Date", and "Datetime". The values are just stored as numbers and a format is applied to