forked from github/dataease
fix: 精简模式下导入csv部分文件报错
This commit is contained in:
parent
fc78ac790e
commit
78c1c5259c
@ -757,7 +757,13 @@ public class ExtractDataService {
|
||||
List<List<String>> csvData = new ArrayList<>();
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
csvData.add(Arrays.asList(line.split(",")));
|
||||
if(line.endsWith(",")){
|
||||
List<String> 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);
|
||||
|
Loading…
Reference in New Issue
Block a user