double型的数据右边补零怎么弄 你可以用NumberFormat不过返回的是String,不可能还是double不知道double型的123.456000与123.456有什么区别,你用来干什么? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 NumberFormat nf = NumberFormat.getInstance();nf.setMinimumFractionDigits(6);System.out.println(nf.format(123.456)); 不知道有谁用过 jexcelapi 这东西能输出excel格式的文件,我从数据库里取出的是String类型的,小数点后面有零。但我转成double后就没零了。double data = Double.parseDouble(doubleString); System.out.println("data=" + data);NumberFormat fivedps = new NumberFormat(format.toString());WritableCellFormat fivedpsFormat = new WritableCellFormat(fivedps);Number number4 = new Number(j + 1, i, data, fivedpsFormat); data就是我想在excel里面表现得值。不知道能不能对excel的colum设置格式,如果有人用过 jexcelapi 请告知。 还有啊!有谁知道有什么包能帮忙输出.dbf文件格式。 java中一些疑惑的题,请给出详细的解析,谢谢 新人java问题 望高手能以下面例子解释下锁机制 能否将String值作为语句执行 eclipse启动debug的模式,但在eclipse里设置工程debug时报错? Tomcat启动时的问题 哪位好心人帮我看看堆排序哪里出问题了 看看我的程序,为什么会产生ClassCastException 各位用JAVA做Web-based Application的朋友,有没有这种感觉? 为何提示错误? 关于包的概念比较模糊 请指教 java中如何垂直显示内容
System.out.println(nf.format(123.456));
double data = Double.parseDouble(doubleString);
System.out.println("data=" + data);
NumberFormat fivedps = new NumberFormat(format.toString());
WritableCellFormat fivedpsFormat = new WritableCellFormat(fivedps);
Number number4 = new Number(j + 1, i, data, fivedpsFormat);
data就是我想在excel里面表现得值。
不知道能不能对excel的colum设置格式,如果有人用过 jexcelapi 请告知。