Data grid export to Excel via Excel exporter

3
Hi, I want to export a data grid to Excel using the Excel exporter module. I followed the steps described here: https://world.mendix.com/display/howto50/Using+the+Excel+Exporter#UsingtheExcelExporter-4.CreatingExcelExportTemplates I added a microflow button to a datagrid passing all objects of the data grid to the microflow as a list. However, when I call the java action GenerateExcelDoc I have to pass three parameters. The MxTemplate, a file document and any object. I retrieved the MxTemplate and created a (specialization) of a file document, but how do I pass all the objects in my list? I can only pass one. In the manual (5.1) I see only two parameters (PolicyDoc and MxTemplate) in their microflow. Hope someone can help. Thanks!
asked
5 answers
2

Is there a reason why you would want to use the Excel Exporter module instead of the standard 'Export to Excel' button for a datagrid?

answered
0

Hi Ron,

In your domain model create a many to many relationship between the file document entity and the entity of your list objects (originating in the file document entity).

In the MicroFlow: create a file document object (as you mentioned). After this you can use the 'Loop' activity that uses the list of all your objects. Inside the loop place a 'Change' activity. The change activity should have as input variable your file document and as action you add the relation with the list objects. like:

Input variable: 'your file document object'
Member: 'the many to many relationship between the file document and you list entity'
Member type: 'list entity'
Type: 'Add'
Value: 'Iterator object'

Now you only need to pass the template object and the file document object in your Generate Report microflow.

Hoping this helps

answered
0

The XLSReport.GenerateExcelDoc java action has 3 parameters as you state, but the InputObject parameter is not a list of the records to export. As far as I can see, there are 2 ways to identify which rows to export - one is through the constraints in the template, and the other is by creating a helper entity as the InputObject, which then has a list of the objects to report linked to it over an association.

So, the simplest way to use this is to leave the InputObject field blank in your template and pass an 'empty' as the parameter when you call the java action. The report will then retrieve all rows from the database, filtered by whatever constraints you have set in the template.

The alternative is to pass the InputObjecvt after your microflow has created this record and linked the rows to export to it... I think !

answered
0

Hi Ron, I am also facing the problem in my project while doing the implementation. If you have got the solution, could you please mention your resolution in comments below so that i can take a reference? Thanks in advance.

answered
0

Hi,

Recently medix launched a widget Data grid 2, it have some extra features like column select or deselect at runtime, so I am facing issue while importing the data that was associated with that data grid 2( the selected data must exported into that excel, but it is nt happened, it exports the whole data that was related with to the entity). Can anybody help me out please.

answered