fix: 替换excel文件失败

This commit is contained in:
taojinlong 2023-11-28 16:33:07 +08:00
parent 5969444127
commit a84e27d687
2 changed files with 2 additions and 2 deletions

View File

@ -351,7 +351,7 @@ public class ExcelUtils {
ReadCellData<?> cellData = headMap.get(key);
String value = cellData.getStringValue();
if (StringUtils.isEmpty(value)) {
DEException.throwException(context.readSheetHolder().getSheetName() + ", 首行行中不允许有空单元格!");
continue;
}
headerKey.add(key);
header.add(value);

View File

@ -755,7 +755,7 @@ public class DatasourceServer implements DatasourceApi {
}
}
}
if (CollectionUtils.isEmpty(excelSheetDataList)) {
if (CollectionUtils.isEmpty(excelSheetDataList) || excelSheetDataList.size() != datasetTableDTOS.size()) {
DEException.throwException("上传文件与源文件不一致,请检查文件!");
}
excelFileData.setSheets(excelSheetDataList);