ARIS Community - We Love BPM

wdxLibrary for .docx output

billie1989's picture
by Nikita Martyanov in Reports & Macros posted on 2017-10-09

Hello everybody!

I've just finished my home opensource project and I'm ready to share the results with you.

I've been coding for ARIS Platform (scripts, macros) for many years. And there was a lot of situations when I needed to make special formatting in report, but standard output functions didn't allow to meet these requirements.

A few months ago I faced the obstacle again. I had to create a footnote in output. But there was no functionality neither for footnotes nor endnotes. Yes, I know about POI library. I have read a post about it on this forum, but POI has many other restrictions. Also you can't change it on the fly to make a specific output quicker.

That's why I decided to create own JS library for .docx output. It's called wdxLibrary. It works over OpenXML4J and ooxml-schemas.

It has next features:

  • Sections and their properties
  • Columns of the page
  • Special text formatting (any formatting you can find in ECMA standards)
  • Special paragraph formatting
  • Footnotes
  • Endnotes
  • Headers
  • Footers
  • Fields (page number, table of contents etc)
  • Tables, table rows, table cells and their properties
  • Bookmarks
  • Hyperlinks (internal and external)
  • Numbered and bulleted lists (including multilevel lists)
  • Embedded files
  • Graphic output
  • “Native” styles of document

You can find this library here Don't forget about readme file. Hope you'll find wdxLibrary useful. It works in ARIS 7.2 and 9.8 (9.6). I don't have an opportunity to test it on ARIS 10.

In attached file you can find some formatting you can get if you use wdxLibrary. This file was generated using it.

It's possible to use base of wdxLibrary to develop same libraries for .xlsx and .pptx.

1 Like
Robert Goldenbaum posted on 2017-10-16

Great work - but I cannot find the poi.jar where you told it would be. And if I search for this file below the SAG folder, I get multiple one from 3.10 to 3.13. 

Do you know if I would have to put the ooxml-schemas-1.1.jar to each of their folders ?

BR Robert

Nikita Martyanov posted on 2017-10-16

Hi Robert,

Which version of ARIS do you use? 7, 9 10? Business Server or Local? You have to put it in "abs" folder only If you mean ARIS 9. I tested it on ARIS 9, and it was enough to put in {%ARIS_Installation_Directory%}/LOCALSERVER/bin/work/work_abs_local/base/webapps/abs/WEB-INF/lib .

poi.jar - just common name. There are version of POI in file name in ARIS 9.

And ooxml-schemas-1.1.jar matches POI from 3.10 to 3.13. And I suppose It's enough to put it in "abs".

Robert Goldenbaum posted on 2017-10-16

Hi Nikita,

ARIS 9 with either LOCAL or LOCALHOST...    And ok thanks, I will try to check this out. But looks really good :-)

BR Robert

Nikita Martyanov posted on 2017-10-16

Thank you, Robert! I appreciate your positive feedback.

Nikita Martyanov posted on 2017-10-24

Hello everybody!

I've created small wiki for my project. If you use wdxLibrary, feel free to visit for help.

Nikita Martyanov posted on 2017-11-26


- added wdxWordPicture option to adjust picture to fit in the page;
- added method for wdxWord (setProperties).Now next properties of output file are available for editing: author, subject, title etc