The
looks like this:
public static String Rethreestr (String ss) {Boolean result= ss.matches ("^[-+]"? ( ([0-9]+) ([.] ([0-9]+)]? | ([.] ([0-9]+)]
$"); if (result&&ss!=null&&! "".
Equals (ss)) {Double sss=double.valueof (ss);
String numstr=new Java.text.DecimalFormat ("0.000"). Format (SSS);
Double lsdou=double.valueof (NUMSTR);
Ss=string.valueof (Lsdou);
} return SS;
public static BigDecimal Rethreebig (BigDecimal ss) {String numstr=new Java.text.DecimalFormat ("0.000"). Format (ss);
BigDecimal newnum=new BigDecimal (NUMSTR);
return newnum; public static string Delezero (String old) {Boolean result= old.matches ("^[-+]"? ( ([0-9]+) ([.] ([0-9]+)]? | ([.] ([0-9]+)]
$"); if (result&&old!=null&&! "".
Equals (old)) {String newstr=old;
if (Old.contains (". 0")) {old=newstr.substring (0, Old.length ()-2);
return old;
}else{return old; }
}
The above Java POI Parsing Excel data Conversion public method (recommended) is a small series to share all the content, hope to give you a reference, but also hope that we support cloud habitat community.