From 7bcf05b11246cc0fa2b96d883ebe32f57cd9bb45 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Wed, 25 Aug 2021 21:51:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20excel=20=E5=A4=9Asheets=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/service/dataset/ExtractDataService.java | 3 +++ 1 file changed, 3 insertions(+) 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 04488064cf..7b86ae2968 100644 --- a/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java +++ b/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java @@ -885,12 +885,14 @@ public class ExtractDataService { List sheetNames = new ArrayList<>(); List files = new ArrayList<>(); + List filesRequired = new ArrayList<>(); for (ExcelSheetData excelSheetData : excelSheetDataList) { if(!sheetNames.contains(excelSheetData.getExcelLable())){ sheetNames.add(excelSheetData.getExcelLable()); } if(!files.contains(excelSheetData.getPath())){ files.add(excelSheetData.getPath()); + filesRequired.add("Y"); } } if (StringUtils.equalsIgnoreCase(suffix, "xlsx")) { @@ -903,6 +905,7 @@ public class ExtractDataService { } excelInputMeta.setPassword("Encrypted"); excelInputMeta.setFileName( files.toArray(new String[files.size()])); + excelInputMeta.setFileRequired(filesRequired.toArray(new String[filesRequired.size()])); excelInputMeta.setStartsWithHeader(true); excelInputMeta.setIgnoreEmptyRows(true); ExcelInputField[] fields = new ExcelInputField[datasetTableFields.size()];