@@ -25,6 +25,8 @@ import org.jeecgframework.poi.exception.excel.ExcelExportException; | |||||
* @date 2015年4月25日 下午12:13:21 | * @date 2015年4月25日 下午12:13:21 | ||||
*/ | */ | ||||
public final class PoiElUtil { | public final class PoiElUtil { | ||||
public static final String LENGTH = "le:"; | public static final String LENGTH = "le:"; | ||||
public static final String FOREACH = "fe:"; | public static final String FOREACH = "fe:"; | ||||
@@ -220,10 +222,6 @@ public final class PoiElUtil { | |||||
.trim(); | .trim(); | ||||
} | } | ||||
public static void main(String[] args) { | |||||
System.out.println(getKey(IF_DELETE, "测试 " + IF_DELETE + " (小明)")); | |||||
} | |||||
/** | /** | ||||
* 三目运算 | * 三目运算 | ||||
* @return | * @return | ||||
@@ -185,11 +185,10 @@ public final class PoiMergeCellUtil { | |||||
* @return | * @return | ||||
*/ | */ | ||||
private static String getCellNotNullText(Cell cell, int index, int rowNum) { | private static String getCellNotNullText(Cell cell, int index, int rowNum) { | ||||
String temp = cell.getRow().getCell(index).getStringCellValue(); | |||||
while (StringUtils.isEmpty(temp)) { | |||||
temp = cell.getRow().getSheet().getRow(--rowNum).getCell(index).getStringCellValue(); | |||||
if(cell.getRow().getCell(index) != null && StringUtils.isNotEmpty(cell.getRow().getCell(index).getStringCellValue())){ | |||||
return cell.getRow().getCell(index).getStringCellValue(); | |||||
} | } | ||||
return temp; | |||||
return getCellNotNullText(cell.getRow().getSheet().getRow(--rowNum).getCell(index),index,rowNum); | |||||
} | } | ||||
} | } |