Bug 64615

Summary: Extraction of content under a particular heading in Word Document .
Product: POI Reporter: Akash <akash.soni58>
Component: XWPFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: critical CC: akash.soni58
Priority: P1    
Version: 4.1.1-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Akash 2020-07-20 08:26:23 UTC
Trying to extract the content under a particular heading(Heading 2) in the document .
How to achieve it ?
Comment 1 Sayi 2020-08-10 10:58:17 UTC
(In reply to Akash from comment #0)
> Trying to extract the content under a particular heading(Heading 2) in the
> document .
> How to achieve it ?

Traverse all paragraphs and get the style ID through paragraph.getStyleID(),

get all styles through XWPFDocument.getStyles() or XWPFDocument.getStyle().

Get what you want by comparing style names(Pay attention to the style name in your document).
Comment 2 Dominik Stadler 2020-10-25 04:43:34 UTC
Resolving for now as no actual issue, please use the contact options described at http://poi.apache.org/help/index.html for discussing usage of Apache POI.