|
@@ -629,6 +629,16 @@ public class FormulaUtils {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ public static List<ElementData> setScale(Integer scale, List<ElementData> data){
|
|
|
|
+ if(scale==null){
|
|
|
|
+ scale=StringUtils.getScale(data.stream().map(ElementData::getValue).filter(StringUtils::isDouble).collect(Collectors.toList()));
|
|
|
|
+ }
|
|
|
|
+ Integer finalScale = scale;
|
|
|
|
+ return data.stream().peek(e->{if(StringUtils.isDouble(e.getValue())){e.setValue(StringUtils.number2StringZero(e.getValue(),finalScale));}}).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+
|
|
/* public static void main(String[] args) {
|
|
/* public static void main(String[] args) {
|
|
Map<String,String> map=getElementCell("/www/wwwroot/Users/hongchuangyanfa/Desktop/privateUrl/1688447882195107840.html","key_31");
|
|
Map<String,String> map=getElementCell("/www/wwwroot/Users/hongchuangyanfa/Desktop/privateUrl/1688447882195107840.html","key_31");
|
|
System.out.println(map);
|
|
System.out.println(map);
|