My question is how can I dynamically populate a table with data, with each piece of data going into a separate row?
Image of the table if previous link is wrong https://drive.google.com/file/d/1j6qzMvnbymS3yNStEJ5YQTrs2rTXwItW/view?usp=drive_link
- Code: Select all
Map<String, Object> parameters = new HashMap<>();
parameters.put("asdq_Z6","működj légyszi");
parameters.put("company_GE", "cégecske");
parameters.put("contact_dv", "Kontakt Perszönöcske");
parameters.put("offer_number_Pd", "0123456");
LocalDate date = ZonedDateTime.now().toLocalDate();
parameters.put("valid_to_bT", date);
parameters.put("price_table_w6", "prájsztéböl");
parameters.put("port_Xj", "port");
parameters.put("departure_port_Iy", "xy_port");
docGenerator.generateDocument(new File("..\\taplate.docx"), parameters, new FileOutputStream("..\\result.docx")
);
Thanks in advance for the help!