excelFile">
//这个filez中name属性excelFile必须与action中的File名字一模一样
private File excelFile;
private String excelFileContentType;
private String excelFileFileName;
核心代码如下
InputStream is = new FileInputStream(this.excelFile);
Workbook wbk = Workbook.getWorkbook(is);
Sheet sheet1 = wbk.getSheet(0);
for(int i =0;i for(int j=0;j Cell cell = sheet1.getCell(j, i); //这个地方就可以把数据提取出来了 System.out.print(cell.getContents()+"\t"); } System.out.println(); } wbk.close(); is.close();