当前位置: 代码迷 >> J2EE >> jxl excel 添加公式报错 (答案)
  详细解决方案

jxl excel 添加公式报错 (答案)

热度:446   发布时间:2016-04-22 02:32:56.0
jxl excel 添加公式报错 (在线等答案)
以下是添加公式代码:
WritableSheet sheet = book.getSheet(0);
NumberFormat nf = new NumberFormat("#.##");
WritableCellFormat wcfN = new WritableCellFormat(nf);

Formula f = new Formula(col, row, formula,wcfN);  
sheet.addCell(f);  

报以下的错误:怎么解决?哪位大侠帮帮我!


java.util.MissingResourceException: Can't find bundle for base name functions, locale zh_CN
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1427)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1250)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:777)
at jxl.biff.formula.FunctionNames.<init>(FunctionNames.java:58)
at jxl.WorkbookSettings.getFunctionNames(WorkbookSettings.java:455)
at jxl.biff.formula.Function.getFunction(Function.java:159)
at jxl.biff.formula.StringFunction.getFunction(StringFunction.java:67)
at jxl.biff.formula.StringFormulaParser.handleFunction(StringFormulaParser.java:345)
at jxl.biff.formula.StringFormulaParser.parseCurrent(StringFormulaParser.java:145)
at jxl.biff.formula.StringFormulaParser.parse(StringFormulaParser.java:115)
at jxl.biff.formula.FormulaParser.parse(FormulaParser.java:98)
at jxl.write.biff.FormulaRecord.initialize(FormulaRecord.java:166)
at jxl.write.biff.FormulaRecord.setCellDetails(FormulaRecord.java:249)
at jxl.write.biff.WritableSheetImpl.addCell(WritableSheetImpl.java:796)
at com.infoservice.dcs.report.inforeport.GSTest.testGS(GSTest.java:40)
at com.infoservice.dcs.report.inforeport.GSTest.main(GSTest.java:121)




第一次 写添加公式的 内容,希望 大侠能帮我 解决!

------解决方案--------------------
Can't find bundle for base name functions, locale zh_CN

单纯看错误,是因为函数不支持中文绑定,也就是说jxl有本地化问题。
------解决方案--------------------
找高手看看怎样
------解决方案--------------------
java.util.MissingResourceException: Can't find bundle for base name functions, locale zh_CN

问题很明显 没有找到中文格式的资源文件
  相关解决方案