|
@@ -402,21 +402,22 @@ public class POIUtils {
|
|
while(srcRowIndex<= rowNum){
|
|
while(srcRowIndex<= rowNum){
|
|
Row dataRow1 = srcSheet.getRow(srcRowIndex);
|
|
Row dataRow1 = srcSheet.getRow(srcRowIndex);
|
|
|
|
|
|
- Cell cell = dataRow1.getCell(validateColIndex);
|
|
|
|
-
|
|
|
|
- if (cell!=null && StringUtils.isNotEmpty(cell.getStringCellValue())){
|
|
|
|
- Row dataRow2 = destSheet.createRow(destRowIndex);
|
|
|
|
-
|
|
|
|
- for (int i=0;i<dataRow1.getLastCellNum();i++){
|
|
|
|
- if (dataRow1.getCell(i)!=null) {
|
|
|
|
- dataRow2.createCell(i).setCellValue((String)getCellValue(0,srcRowIndex,i));
|
|
|
|
- }
|
|
|
|
- else{
|
|
|
|
- break;
|
|
|
|
|
|
+ if(dataRow1!=null) {
|
|
|
|
+ Cell cell = dataRow1.getCell(validateColIndex);
|
|
|
|
+
|
|
|
|
+ if (cell != null && StringUtils.isNotEmpty(cell.getStringCellValue())) {
|
|
|
|
+ Row dataRow2 = destSheet.createRow(destRowIndex);
|
|
|
|
+
|
|
|
|
+ for (int i = 0; i < dataRow1.getLastCellNum(); i++) {
|
|
|
|
+ if (dataRow1.getCell(i) != null) {
|
|
|
|
+ dataRow2.createCell(i).setCellValue((String) getCellValue(0, srcRowIndex, i));
|
|
|
|
+ } else {
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
|
|
- destRowIndex++;
|
|
|
|
|
|
+ destRowIndex++;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
srcRowIndex++;
|
|
srcRowIndex++;
|