@Test
    public void compositeFill() {
        // Template note: Use {} to indicate variables. If there are existing "{", "}" characters, use "\{", "\}" instead.
        // {} represents a normal variable, {.} represents a list variable, {prefix.} prefix can distinguish different lists.
        String templateFileName =
            TestFileUtil.getPath() + "demo" + File.separator + "fill" + File.separator + "composite.xlsx";

        String fileName = TestFileUtil.getPath() + "compositeFill" + System.currentTimeMillis() + ".xlsx";

        // Option 1
        try (ExcelWriter excelWriter = EasyExcel.write(fileName).withTemplate(templateFileName).build()) {
            WriteSheet writeSheet = EasyExcel.writerSheet().build();
            FillConfig fillConfig = FillConfig.builder().direction(WriteDirectionEnum.HORIZONTAL).build();
            // If there are multiple lists, the template must have {prefix.}. Here, the prefix is data1, and multiple lists must be wrapped with FillWrapper.
            excelWriter.fill(new FillWrapper("data1", data()), fillConfig, writeSheet);
            excelWriter.fill(new FillWrapper("data1", data()), fillConfig, writeSheet);
            excelWriter.fill(new FillWrapper("data2", data()), writeSheet);
            excelWriter.fill(new FillWrapper("data2", data()), writeSheet);
            excelWriter.fill(new FillWrapper("data3", data()), writeSheet);
            excelWriter.fill(new FillWrapper("data3", data()), writeSheet);

            Map<String, Object> map = new HashMap<String, Object>();
            map.put("date", new Date());

            excelWriter.fill(map, writeSheet);
        }
    }
Example of composite filling with multiple lists

@since 2.2.0-beta1
fastexcel-test/src/test/java/cn/idev/excel/test/demo/fill/FillTest.java