MS Word templates

I’m continuing generating texts and advertising really useful java projects (previous advertisements: ICU, ImageIO-Ext), the new challenge was to generate MS Office Word documentspopulate MS Office Word templates by repository data. Actually, generation and template processing are two different tasks – in case of the first one I would prefer either docx4j or XMLmind XSL-FO, but in case of template processing there are no much options available, especially, if I introduce two extremely basic requirements:

  • support of loops/iterators/tables
  • support of decisions/conditions

Initially, we had an idea to use Aspose, but it completely lacks support of decisions/conditions, moreover it’s support of loops/iterators/tables is extremely poor (besides the fact that the code is obfuscated), and after that we discovered xdocreport which perfectly fits our needs: