@Test
    public void complexFillWithTable() {
        // Template note: Use {} to indicate variables. If there are existing "{", "}" characters, use "\{", "\}" instead.
        // {} represents a normal variable, {.} represents a list variable.
        // Here, the template deletes the data after the list, i.e., the summary row.
        String templateFileName =
            TestFileUtil.getPath() + "demo" + File.separator + "fill" + File.separator + "complexFillWithTable.xlsx";

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

        // Option 1
        try (ExcelWriter excelWriter = EasyExcel.write(fileName).withTemplate(templateFileName).build()) {
            WriteSheet writeSheet = EasyExcel.writerSheet().build();
            // Directly write data
            excelWriter.fill(data(), writeSheet);
            excelWriter.fill(data(), writeSheet);

            // Write data before the list
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("date", "2019-10-09 13:28:28");
            excelWriter.fill(map, writeSheet);

            // There is a summary after the list, which needs to be written manually.
            // Here, we use a list for simplicity. You can also use an object.
            List<List<String>> totalListList = ListUtils.newArrayList();
            List<String> totalList = ListUtils.newArrayList();
            totalListList.add(totalList);
            totalList.add(null);
            totalList.add(null);
            totalList.add(null);
            // Fourth column
            totalList.add("Total:1000");
            // Note: Use write here, not fill.
            excelWriter.write(totalListList, writeSheet);
            // Overall, the writing is complex, but there is no better solution. Asynchronous writing to Excel does not support row deletion or movement, nor does it support writing comments, so this approach is used.
            // The idea is to create a new sheet and copy data bit by bit. However, when adding rows to the list, the data in the columns below cannot be shifted. A better solution will be explored in the future.
        }
    }
Example of complex filling with large datasets
<p>
The solution here is to ensure that the list in the template is the last row, and then append a table. For Excel 2003, there is no solution other than increasing memory.

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