try { String source = "xxx.xls"; InputStream is = new FileInputStream(source); Workbook rwb = Workbook.getWorkbook(is); Sheet sheet = rwb.getSheet(0); for (int i = 1; i < sheet.getRows(); i++) { for (int j = 1; j < sheet.getColumns(); j++) { //获取指定单元格的对象引用,需要注重的是它的两个参数,第一个是列数,第二个是行数 Cell cell = sheet.getCell(j, i); System.out.print("Values : " + cell.getContents().trim()); } System.out.println(); } } catch (Exception e) { e.printStackTrace(); } }