Excel Exporter - Multiple Custom Sheets?

0
I have a requirement to created multiple custom sheets in an Excel file.  The data consists of a Parent Entity (ReportParent) with multiple child entities, one for each month (ReportMonth).  I would like to create an Excel file with one tab or worksheet for each month.  So if my report has 12 months of data, I would generate a file with 12 sheets, with each sheet contain report information for that month. I don't think I can do this with out of the box Excel Export, so I thought I would ask the community if anyone has done something similar and, if so, how.  Any pointers will be greatly appreciated.
asked
2 answers
0

This should be possible with the out of the box excel exporter. You'd need to set 12 associations and create individual sheets using each.

answered
0

Hi Mike,

I think the two things that you are trying to do is be able to dynamically change the names of the excel tabs and control how many sheets are exported? And your data is separated by separate entities that are associated to the report parent?

Here is a microflow where I have a template with 3 tabs setup, and if the data doesnt exist for one of the tabs, I remove the sheet from the template before exporting. Also if the data does exist, I change the excel sheet tab name.

https://modelshare.mendix.com/models/7b748b51-1b81-48dc-9da2-911d9bff6560/createexcel-report

The domain model that I used was this. Hopefully your structure is similar. 

 

Also here is the test project where I did the example.

https://drive.google.com/file/d/1yVSBv7wNzTQrFqDDQJoOewZVuaqkkl9p/view?usp=sharing

answered