on-internet
← Community

When populating an Excel template from a list of objects with Axyra Sheets, how do I repeat a formatted row?

Stack Overflow ·

I’m generating order reports from an existing .xlsx template with Axyra Sheets (io.keikai:axyra-sheets, 1.0.0-Beta). The “Orders” sheet in the template looks like: headers (Product / Quantity / Price) a sample data row with borders and a currency format on column C a total row with =SUM(C2:C2) My data is a list of records: record Order(String product, int quantity, double price) {} List<Order> orders = List.of( new Order("Laptop", 2, 1200.0), new Order("Mouse", 5, 25.0), new Order("Keyboard", 3, 80.0) ); I found Sheet.importData and tried writing the list starting at row 2: try (Workbook wb =

Comments

Sign in or sign up to comment and upvote.

No comments yet.