In some rare cases, a ArrayIndexOutOfBoundsException occurs in org.apache.poi.hwpf.sprm.TableSprmUncompressor.unCompressTAPOperation, line 152. The problem appears to be that the grpprl does not hold data for every cell in a row. Therefore, the computed index is larger than the length of the grpprl. This has happened in some documents saved with Word97. When I open and save them in Word2003, the problem disappears. The problem is reproduceable using Word97. The proposed patch simply checks if the computed index is within bounds. This is probably not addressing the root of the problem, but I could not come up with something more intelligent. I will add the patch and a word document which has this problem.
Created attachment 21275 [details] Word document causing the exception When you open and save this file in Word2003, the problem disappears. But it does happen when you use Word97.
Created attachment 21276 [details] Patch for this bug
Thanks for this patch, it has been applied