diff --git a/rxlib-x/src/main/java/org/rx/util/Helper.java b/rxlib-x/src/main/java/org/rx/util/Helper.java index df958d4e..dab47860 100644 --- a/rxlib-x/src/main/java/org/rx/util/Helper.java +++ b/rxlib-x/src/main/java/org/rx/util/Helper.java @@ -144,14 +144,14 @@ public static Map> readExcel(InputStream in, boolean is20 return data; } - public static void writeExcel(OutputStream out, boolean is2003File, Map> data) { - writeExcel(out, is2003File, data, null); + public static void writeExcel(OutputStream out, boolean is2003File, Iterable sheetRows) { + writeExcel(out, is2003File, Collections.singletonMap("sheet1", sheetRows), null); } @SneakyThrows - public static void writeExcel(OutputStream out, boolean is2003File, Map> data, Function onRow) { + public static void writeExcel(OutputStream out, boolean is2003File, Map> sheets, Function onRow) { try (Workbook workbook = is2003File ? new HSSFWorkbook() : new XSSFWorkbook()) { - for (Map.Entry> entry : data.entrySet()) { + for (Map.Entry> entry : sheets.entrySet()) { Sheet sheet = workbook.getSheet(entry.getKey()); if (sheet == null) { sheet = workbook.createSheet(entry.getKey());