3
我可以读取Excel工作表逐列使用Apache POI ..?(不使用排迭代器)阅读Excel工作表逐列使用Apache POI
for (Row row : sheet) {
Cell firstCell = row.getCell(0);
// Printing Stuff
}
我知道,上面的人会做同样的。但是我需要在不使用Row Iterator的情况下获得第一列的数据。
我可以读取Excel工作表逐列使用Apache POI ..?(不使用排迭代器)阅读Excel工作表逐列使用Apache POI
for (Row row : sheet) {
Cell firstCell = row.getCell(0);
// Printing Stuff
}
我知道,上面的人会做同样的。但是我需要在不使用Row Iterator的情况下获得第一列的数据。
您可以在纸张迭代,而无需使用迭代器
Workbook wb = WorkbookFactory.create(new FileInputStream("file.xls"));
Sheet sheet = wb.getSheetAt(0);
for (int j=0; j< sheet.getLastRowNum() + 1; j++) {
Row row = sheet.getRow(j);
Cell cell = row.getCell(0); //get first cell
// Printing Stuff
}