How to reformat a flat list into a multi-column in docx template

Hi everyone,

I’m building a scenario that reads a user list from an Excel file and generates a formatted DOCX from it. The output should look like this – 4 columns side by side to save space on the page:

# Name # Name # Name # Name
1 2 3 4
5 6 7 8

My current flow:

  1. Excel module → reads rows one by one
  2. Array Aggregator → collects all rows into one array
  3. DOCX Template module → fills a .docx template

The problem: The DOCX Template module (Docxtemplater) loops through the array and repeats one row per entry – so all names end up in a single column. I need to chunk the flat array into groups of 4 before passing it to the template.

Question: Is there a native Make way to chunk an array into groups of 4 – without using a Code module or external tools? Or is there a smarter approach to get the 4-column layout in the DOCX?

The list can have up to ~200 entries, so the solution needs to scale dynamically.

Thanks!

This is how it should look like

Hey there,

what does the template look like? Is it a table you are filling or is it a placeholder you are replacing with a table?

For now I am using this as template for my table:

There is no native chunk() in Make, this is tricky without a Code module, but other options are doable.

The ways to practically achieve this are:

-Add a code module: This is the simplest to do with a few lines of JS to chunk the flat array into groups of 4 before it hits the DOCX template. Every chunk becomes a row object, and your template loops cleanly over rows.

-Try to restructure in Excel: If you can do this with your source data, pre-arrange the Excel file into 4 columns. The Array Aggregator will then collect row objects directly with no chunking needed.

-Using only Make: Use the slice() + Set Variable function to manually extract each group of 4. For 200 entries that will mean around 50 manual slices. If your lists are small it will work but it doesn’t scale the way you need.

If you have a dynamic list up to 200 entries, the Code module is probably your best bet to keep it simple.