50,528
社区成员
发帖
与我相关
我的任务
分享
Workbook book = null;
book = Workbook.getWorkbook(new File(filePath));
// 获取sheet
Sheet sheet = book.getSheet(0);
int rows = sheet.getRows();//行
int cols = sheet.getColumns();//列
for (int r = 1; r < rows; r++) {
List<String> innerList = new ArrayList<String>();
Cell[] rowCells = sheet.getRow(r);
if (sameIndexList.contains(r-1)) {
for (int c = 0; c < cols; c++) {
if(c!=3 & c!=10){
Cell cell = rowCells[c];
String value = cell.getContents();
System.out.println("1111"+value);
innerList.add(value);
}
}
retList.add(innerList);
}
}