Dowemo
0 0 0 0

try {
 //创建workbookWorkbook workbook=Workbook.getWorkbook(new File("f://jxl.xls"));//获取第一个sheetSheet sheet=workbook.getSheet(0); for (int i=0;i<sheet.getRows();i++){
 for (int j=0;j<sheet.getColumns();j++){
 Cell cell=sheet.getCell(j,i);System.out.print(cell.getContents() + "");}
 System.out.println();}
 //关闭workbook.close();} catch (IOException e) {
 e.printStackTrace();} catch (Exception e) {
 e.printStackTrace();}
控制台输出
序号 姓名 年龄 
1 user1 24 
2 user2 24 
3 user3 24 
4 user4 24 
5 user5 24 
6 user6 24 
7 user7 24 
8 user8 24 
9 user9 24 



Copyright © 2011 Dowemo All rights reserved.    Creative Commons   AboutUs