diff --git a/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java b/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java index a128f5627e..35651738da 100644 --- a/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java +++ b/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java @@ -757,7 +757,13 @@ public class ExtractDataService { List> csvData = new ArrayList<>(); String line; while ((line = reader.readLine()) != null) { - csvData.add(Arrays.asList(line.split(","))); + if(line.endsWith(",")){ + List list = new ArrayList<>(Arrays.asList(line.split(","))); + list.add(""); + csvData.add(list); + }else { + csvData.add(Arrays.asList(line.split(","))); + } } ExcelSheetData csvSheetData = new ExcelSheetData(); String[] fieldArray = fields.stream().map(TableField::getFieldName).toArray(String[]::new);