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文件格式。 wav转mp3格式 重写clone方法时,调用super.clone()一句为什么不会引发ClassCastException呢? 如何在swing中加入flash和movie 请问用java编让程序自动启动的代码。 在linux中保存中文到TXT文件为乱码 我如何用JAVA才能实现文本打印功能? 请教JBUILDER 6个人版注册码? 做网站求解! 关于用Java写Oracle的存储过程时出现的中文字符集的问题? 萌新的点点滴滴-设计模式 关于包的概念比较模糊 请指教 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 请告知。