Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading a document using XWPF as compared to HWPF  RSS feed

 
Ambi inout
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone would like to help this out.
I am reading a document with HWPF(using range) and it returns some 300 paragraphs.
But when i read the same document with macro enabled for XWPF, it returns different number of paragraphs (around 100).
Can anybody tell me why is this discrepancy.
HWPF : Range range = doc2.getRange();
Map<String, MFLplcHoldrOccurances> mflPlcHoldrMap = new HashMap<String, MFLplcHoldrOccurances>();
List<String> xistPlcHoldrPargrafDletdLst = new ArrayList<String>();
int paracount = range.numParagraphs(); // some 300 paragraphs

XWPF : Iterator<XWPFParagraph> itPara = doc2.getParagraphsIterator();
int sizy = doc2.getParagraphs().size(); // some 100 paragraphs

Any suggestion will be highly appreciated


 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!