HI Jeroen Wijnholds,
As far as I know no module is present in Mendix Market Place for Dynamic Headers. We also had a similar use case and we created a custom java action to create an Excel sheet with Dynamic headers. We used the Apache poi library for it. You need not explicitly add the Apache poi jar since it is part of the Excel export module.
Useful links: https://www.geeksforgeeks.org/creating-sheets-in-excel-file-in-java-using-apache-poi/
Hope it helps. All the best !!
You indeed need the Apache POI library for it. To make sure you don’t rewrite all export to Excel logic I would suggest adding a Java action that gets the generated Excel file after the ‘GerenateExcelDoc’ Java action from the Excel Exporter module and adds these top rows after it. Reading an existing Excel file and adding two rows is a lot easier and maintainable.
For an example of how this is done with a Word file you could check my Word Template Demo Project available in the Marketplace. The idea is similar; it also uses the Apache POI Library within a Java action to manipulate an existing MS Office file, in this case a Word Template, and adds content based on Mendix data to the Word document.