When importing Excel data today, it is found that many floating-point data are automatically rounded up only three bits, which was originally encapsulated by JXL in getcontents (), and the processing of numerical data was done. Generally we will read the entire process of Excel as a tool class, then when reading cell data, the data should be divided into three categories (general): date, value, ordinary string. Finally, the unification is converted into a string type.
If it is a date type, you can use the method provided by the Datecell object:
New SimpleDateFormat ("Yyyy-mm-dd"); Cell cell = Sheet.getcell (j, I);
== Sdf.format (Datecell.getdate ());
If it is a numeric type, you can use the method provided by the Numbercell object:
Cell cell = Sheet.getcell (j, I);
Numbercell Numbercell == = numbervalue.tostring ();
JXL three-bit intercept problem when reading Excel floating point data