readCellAsObject

fun readCellAsObject(cell: Cell): Any?(source)

Translates a fastexcel cell into a "best fit" Java object.

  • String/Boolean cells map to String/Boolean.

  • Numeric cells with a date format map to a java.sql.* type chosen by inspecting the format string: date-and-time → Timestamp, date-only → java.sql.Date, time-only → Time. Returning java.sql types keeps the DB round trip (export → re-import via PreparedStatement.setObject) portable across JDBC drivers and strips the 1899-12-30 anchor used when writing TIME values.

  • Other numeric cells map to BigDecimal (fastexcel's native numeric representation).