Considering backwards compatibility and standardization issues, we use the Open Source Tool Apache POI for Excel Reading
When the POI reads, the contents of the cell are considered double, which is not the same as the default string for JXL.
Example code: Https://github.com/tonylee0329/java_lab/blob/master/src/main/java/org/tony/file/ReadExcel.java
Problems encountered in 1. POI reading scientific notation, you can use NumberFormat to format the data. Whether the thousand separator is used: setgroupingused () Reference code
BigDecimal num = new BigDecimal (Cell.getnumericcellvalue ()); NumberFormat format = Numberformat.getinstance (); format.setmaximumfractiondigits (2); format.setgroupingused (false) ; celldata = Format.format (num);
2.POI recognition of dates is also relatively weak, so the format is requiredNewSimpleDateFormat( "yyyy-mm-dd" ).Format (Dateutil.getjavadate (Cell.Getnumericcellvalue ()));
detailed reference to the code on GitHub
Use Apache POI Open source package for Excel reading