订阅 漓筝轩 的RSS 

POI公式解析错误,APACHE,你好狠

按照官方文档
http://poi.apache.org/hssf/eval.html
上面的源代码
CellReference cellReference = new CellReference("B3");
HSSFRow row = sheet.getRow(cellReference.getRow());
HSSFCell cell = row.getCell(cellReference.getCol());
HSSFFormulaEvaluator.CellValue cellValue = evaluator.evaluate(cell);

得到百分之百是一个空指针错误,郁闷啊,查了半天,总算知道了

CellReference cellReference = new CellReference("B3");
HSSFRow row = sheet.getRow(cellReference.getRow());
HSSFCell cell = row.getCell(cellReference.getCol());
evaluator.setCurrentRow(row);
HSSFFormulaEvaluator.CellValue cellValue = evaluator.evaluate(cell);

就这么一行,靠,查了我半个小时,郁闷中
posted @ 2007-07-31 13:50  Jeason  阅读(1332)  评论(0编辑  收藏  举报
订阅 漓筝轩 的RSS