代码拉取完成,页面将自动刷新
http://doc.wupaas.com/docs/easypoi/easypoi-1c10lcjcb45j7
getSingleCellValueForRow直接获取了下一列没有考虑合并单元格的情况
private void getSingleCellValueForRow(ExcelImportResult result, Row row, ImportParams params) {
for (int j = row.getFirstCellNum(), le = row.getLastCellNum(); j < le; j++) {
String text = PoiCellUtil.getCellValue(row.getCell(j));
if (StringUtils.isNoneBlank(text) && text.endsWith(params.getKeyMark())) {
if (result.getMap().containsKey(text)) {
if (result.getMap().get(text) instanceof String) {
List<String> list = new ArrayList<String>();
list.add((String) result.getMap().get(text));
result.getMap().put(text, list);
}
((List) result.getMap().get(text)).add(PoiCellUtil.getCellValue(row.getCell(++j)));
} else {
result.getMap().put(text, PoiCellUtil.getCellValue(row.getCell(++j)));
}
}
}
}