Template processing (.docx) with elixir

Hello everyone. I’ve just started to scratch Elixir’s surface, and I wonder if there is any resource available to process .docx templates in order to generate .docx files.

I’m asking for something similar to sablon in Ruby.

Does anyone ever came across any available resource?

Thanks in advance.

1 Like

I’ve made a personal exported for Excel’s *.xlsx to generate reports, not made one for docx but I’d guess it would be similar, it is hell though, those formats suck… >.>

I’ve not come across one yet though myself, and mine is significantly not functional enough to be release-worthy (it does just barely enough to do what I need it to do).

Could you describe your process?

Maybe I’ll have to drill down the same road :~

Thanks in advance!

Mine is not as fancy as that library at all, I literally just build up the XML manually from the inputs then zip it up, which is just what an xlsx file is… >.>

I’d be sorely tempted to just put together a “minimum viable” console program with something like Docx4j and use it through a port - or possibly make the functionality available behind JInterface for something a little more controlled. It sounds like a lot of work for what should be easy - but it beats wrestling with that awful file format.

Edit: Silly me. If you’re already familiar with Sablon just use ports for that - the article is firing up the Ruby interpreter.

1 Like