java.lang.NoSuchMethodError:org.apache.poi.hssf.usermodel.HSSFSheet.getMergedRegion(I)Lorg/apache/poi/hssf/util/CellRangeAddress;atorg.seasar.fisshplate.core.element.Abst...
java.lang.NoSuchMethodError: org.apache.poi.hssf.usermodel.HSSFSheet.getMergedRegion(I)Lorg/apache/poi/hssf/util/CellRangeAddress;
at org.seasar.fisshplate.core.element.AbstractCell.(AbstractCell.java:54)
at org.seasar.fisshplate.core.element.GenericCell.(GenericCell.java:37)
at org.seasar.fisshplate.core.parser.handler.CellParserHandler.getElementByParsers(CellParserHandler.java:85)
at org.seasar.fisshplate.core.parser.handler.CellParserHandler.getElement(CellParserHandler.java:63)
at org.seasar.fisshplate.core.element.Row.(Row.java:65)
at org.seasar.fisshplate.core.parser.FPParser.createRowElement(FPParser.java:109)
at org.seasar.fisshplate.core.parser.FPParser.parseRow(FPParser.java:104)
at org.seasar.fisshplate.core.parser.FPParser.parse(FPParser.java:66)
at org.seasar.fisshplate.template.FPTemplate.process(FPTemplate.java:111)
at org.seasar.fisshplate.template.FPTemplate.process(FPTemplate.java:90)
at jp.co.softbank.sdm.web.logic.ExcledownloadLogic.xls(ExcledownloadLogic.java:73)
---------------------------------------------------------------------------------
代码如下:
//データ作成
Map map = new HashMap();
map.put("title", "タイトルである");
List aList = new ArrayList();
aList.add(new A("1行目",10,new Date()));
aList.add(new A("2行目",20,new Date()));
aList.add(new A("3行目",30,new Date()));
aList.add(new A("4行目",10,new Date()));
aList.add(new A("5行目",20,new Date()));
aList.add(new A("6行目",30,new Date()));
map.put("b", aList);
InputStream is = new FileInputStream("C:/_Keiyoui/workSpace/0716/sdm1/sdm/src/main/webapp/xls/tt.xls");
FPTemplate template = new FPTemplate();
HSSFWorkbook wb;
try {
wb = template.process(is, map); // 到这句的时候就报错了。
} catch (Exception e) {
//例外処理
throw e;
}
FileOutputStream fos = new FileOutputStream("out.xls");
wb.write(fos);
fos.close();
分不多了。谢谢。
展开