3

When a cell in a spreadsheet contains a simple date (mm/dd/yyyy) the poi API flags the cell-type as 'numeric'. This is probably because spreadsheets ( IMO ) historically recognize only strings and real numbers.

It is possible to hard-code the cell-index, and use it conditionally to call 'getDateCellValue'. But this feels like a hack.

What other ways are there in the poi API to determine whether the content in a cell is a Date rather than a real number?

Randomness
  • 610
  • 6
  • 13
Everyone
  • 2,366
  • 2
  • 26
  • 39

1 Answers1

5

The answer is in the Getting the Cell Contents section of the HSSF Quick Guide

Kevin K
  • 9,344
  • 3
  • 37
  • 62