bengbengbalabalabeng commented on issue #932: URL: https://github.com/apache/fesod/issues/932#issuecomment-4679855555
Please refer to: [Complex fill demo](https://fesod.apache.org/docs/sheet/fill/#complex-fill), [Fill Multiple Lists](https://fesod.apache.org/docs/sheet/fill/#fill-multiple-lists-together) By using `FillConfig#forceNewRow` and `FillWrapper`, the current problem can be solved. **DEMO:** ```java // Excel Model @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode @Data public class ExcelModel { private Integer no; private String name; private String other; public static List<ExcelModel> build() { return IntStream.range(0, 3) .mapToObj(idx -> new ExcelModel(idx, "Name" + idx, "Other" + idx)) .toList(); } } // Write try (ExcelWriter writer = FesodSheet.write(OUTPUT) .withTemplate(TEMPLATE) .build()) { FillConfig fillConfig = FillConfig.builder() .forceNewRow(true) .build(); WriteSheet writeSheet = FesodSheet.writerSheet(0).build(); writer.fill(new FillWrapper("data1", ExcelModel.build()), fillConfig, writeSheet); writer.fill(new FillWrapper("data2", ExcelModel.build()), writeSheet); } ``` Template: <img width="338" height="225" alt="Image" src="https://github.com/user-attachments/assets/300a67f9-9e60-42cf-8cf5-cf3022933a03" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
