Search code examples
javaapache-poixwpf

How to generate multilevel nested numbered list in Java using Apache POI XWPFDocument?


I want to create a list like this using apache POI word :

1.A  
1.1  A 11  
1.2  A 12  

2.B  
2.1  B 21  
2.2  B 23  

...... and so on ....

My Data is dynamic.

I am able to create a normal list. Also I have gone through this and that. But couldn't find anything to do it. Also searched in google but did not find any documentation about it. Would anyone please help me out to find docs or solution to it ?


Solution

  • This is not currently supported in POI. It is quite complex. You will have to use the CT classes to do it. To get started you will want to download the standard from here. http://www.ecma-international.org/publications/standards/Ecma-376.htm

    Parts 1, 3, and 4 are the most useful.

    POI uses the 1st edition standards. That is equivalent to Word 2007.