You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "Mitchell Ackerman (Contractor)" <MA...@ezenia.com> on 2004/03/09 19:51:19 UTC

error opening word file

Hi, I am getting the following exception when trying to use a Word file.
The file is an MS office word 2003, build 11.6113.5703 on windows XP.

Any ideas?

java.lang.IndexOutOfBoundsException: Index: 36, Size: 36
	at java.util.ArrayList.RangeCheck(ArrayList.java:507)
	at java.util.ArrayList.get(ArrayList.java:324)
	at org.apache.poi.hwpf.usermodel.Range.findRange(Range.java:544)
	at
org.apache.poi.hwpf.usermodel.Range.initCharacterRuns(Range.java:500)
	at
org.apache.poi.hwpf.usermodel.Range.numCharacterRuns(Range.java:228)


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: error opening word file

Posted by Ryan Ackley <sa...@cfl.rr.com>.
I found and fixed a similar problem that I haven't committed yet. The
problem is that I miscalculate the upper limit char offset of the document.
The problem is in HWPFDocument.getRange()

-Ryan

----- Original Message ----- 
From: "Mitchell Ackerman (Contractor)" <MA...@ezenia.com>
To: "POI Users List" <po...@jakarta.apache.org>
Sent: Tuesday, March 09, 2004 1:51 PM
Subject: error opening word file


> Hi, I am getting the following exception when trying to use a Word file.
> The file is an MS office word 2003, build 11.6113.5703 on windows XP.
>
> Any ideas?
>
> java.lang.IndexOutOfBoundsException: Index: 36, Size: 36
> at java.util.ArrayList.RangeCheck(ArrayList.java:507)
> at java.util.ArrayList.get(ArrayList.java:324)
> at org.apache.poi.hwpf.usermodel.Range.findRange(Range.java:544)
> at
> org.apache.poi.hwpf.usermodel.Range.initCharacterRuns(Range.java:500)
> at
> org.apache.poi.hwpf.usermodel.Range.numCharacterRuns(Range.java:228)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org