Hi all, I know that there are some (licensed) possibilities to create Word documents based on a template that uses variables to put data out of the Mendix db into the template and export this filled Word template. My question is; can any of these already existing solutions also generate a graph (for instance stacked bar) into this template and export it with the graph, based on data inside the Mendix db? So, no image, but an actually on the fly generated graph. I hope there is a solution out there already, else I would have to build it from scratch...
I haven’t done this with Mendix’s document templates yet, but here are a few thoughts that might be helpful:
If you are able to get the graphs html as a string, you could insert it as a placeholder onto the document. I’ve done this with images and full html documents so I would imagine this would work with a chart built from html. If its a fairly simple chart you may be able to manipulate the html in a microflow using find and replace.
Another option (that is paid) would to check out the Aspose words for Java library. I’ve used this in the past to replace tokens in a word document, but I just saw that they do have some support for charts. It may be worth taking a look to see if those charts fit your needs. Also although Aspose is paid, its a one time fee vs a yearly subscription. I’ll link the library at the bottom.
Hope this helps! I’ll add some comments if I think of anything else.