我在尝试编写时遇到以下异常.xlsx file using Apache POI
NoClassDefFoundError: javax/xml/stream/XMLStreamException
这是代码片段:-
XSSFWorkbook wb = new XSSFWorkbook();
Sheet sheet = wb.createSheet();
Row row = sheet.createRow(0);
Cell cell = row.createCell(0);
cell.setCellValue(100);
FileOutputStream fileOut = new FileOutputStream("D:\\workspace\\April\\Excel Test\\workbook.xlsx");
wb.write(fileOut);
fileOut.close();
我有以下罐子
- dom4j-1.6.1
- poi-ooxml-3.5-FINAL
- poi-3.6-20091214
- xmlbeans-2.3.0
- ooxml-schemas-1.0
请让我知道我在这里做错了什么,或者我遗漏了一些东西。