I now do data import, with POI parsing Excel, now encountered a problem, because the POI resolution to the numeric type of data, the default will be converted to double type, I judge if the type is cell_type_numeric, want to do special treatment, now have two questions, ask everybody:
1. This column may have integers, there may also be floating point number, integer, read out, to go to the back of the ". 0", decimal is how much is how many, at present this does not know how to deal with;
2. The second problem is that if, first of all, I'm going to do it by judging if I'm going to end up with a. 0 method, then if the cell is typed as "313463165464146.26" (or even longer), it will become a scientific count, so it's inaccurate to read.
Above, with
Double d = cell.getnumericcellvalue ();
DecimalFormat df = new DecimalFormat ("#.##");
String value = Df.format (d);
To deal with, is to make the scientific count into a normal number