NumberFormat nf = new NumberFormat("#.##");
WritableCellFormat wcfN = new WritableCellFormat(nf);jxl.write.Number min = new jxl.write.Number(0, i + 1, "0.33", wcfN);
jxl.write.Number max = new jxl.write.Number(1, i + 1, "11.33", wcfN);添加NUMBER对象的格式,如果数字的整数位是0,导出到excel中时整数位的0就没了(min导出的结果是".33");整数位是非零的数字导出的格式就好着的(max导出结果是"11.33")
WritableCellFormat wcfN = new WritableCellFormat(nf);jxl.write.Number min = new jxl.write.Number(0, i + 1, "0.33", wcfN);
jxl.write.Number max = new jxl.write.Number(1, i + 1, "11.33", wcfN);添加NUMBER对象的格式,如果数字的整数位是0,导出到excel中时整数位的0就没了(min导出的结果是".33");整数位是非零的数字导出的格式就好着的(max导出结果是"11.33")
解决方案 »
- 从porperties配置文件中取出的汉字是乱码怎么解决
- jtextarea 上 怎么获取每行的字符串 求高手帮忙啊
- Ireport3.7.1和struts2整合问题
- TWAIN和JTWAIN详细去背是什么呢?
- 业务层捕捉DataAccessException异常并处理
- 为什么我用Axis2设置的服务器端无法执行,出现The service cannot be found for the endpoint reference错误?
- 事务的嵌套
- struts2当中的问题
- 急,Ibatis拼凑SQL只剩一半了
- 表单信息保存到session,跳转到servlet,一直报404错误
- CXF2.0.4 nor any of its super class is known to this context
- 请问高手iReport能做出这样的报表吗?
后者可能性多点,去试下吧。
把#.##改为0.00 就可以啦。你再试试