How to store, modify, and download an Excel file in Mendix?

0
Hi all, I have a use case where I need to manage an Excel file entirely within a Mendix application. Here's what I want to achieve: Upload an Excel file and store it in the database. Modify the Excel content (e.g., add new data/rows). Store the updated file back in Mendix. Allow the user to download the modified Excel. I’ve already created an entity ExcelFile that generalizes from System.FileDocument to handle the upload. But I’m unsure about the best way to: Programmatically read and write to the Excel file stored in the FileDocument. Save the modified content back into the same object. Use the Excel Importer/Exporter vs. a Java Action with Apache POI. Has anyone implemented something similar? Would appreciate: Example microflows or Java actions if available. Recommendations on when to use Excel Importer/Exporter vs. custom Java. Thanks in advance!
asked
2 answers
0

Hello Jagadeesh waran,

 

If I understand correctly that you want to modify the excel file in mendix, the most straightforward option is to import the excel in mendix with the excel importer on a created entity, then to create a page with a datagrid for this entity and a page edit/new for the entity, and finishing it off with an excel export. 

 

However, if your excel structure changes(colonne wise) a lot, a dedicated entity is not feasible and you are looking into a more complex problem.

 

Hope this helps and let me know what your use case is!

 

Good luck!

 

answered
0

Hello Jagadeesh waran,

You can achieve this by using Excel importer, Data importer widgets.

answered