Bug 61490 - In a particular document, the cell is missing
Summary: In a particular document, the cell is missing
Alias: None
Product: POI
Classification: Unclassified
Component: HWPF (show other bugs)
Version: 3.16-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2017-09-05 08:42 UTC by chenyu_eagle
Modified: 2019-08-29 05:17 UTC (History)
0 users

the test code and .doc file (8.39 KB, application/x-zip-compressed)
2017-09-05 08:42 UTC, chenyu_eagle

Note You need to log in before you can comment on or make changes to this bug.
Description chenyu_eagle 2017-09-05 08:42:46 UTC
Created attachment 35292 [details]
the test code and .doc file

Sorry for my poor english
I'm using Google Translate

I uploaded my test code and test files, see attachment

In this particular case of attachment

   table.numRows() return  4  (actually, it should be 3)

  and the  row.numCells()  at row[2] ,return 2 

  so, the last cell of table (cell value is  33) is missing

  if you insert a space or whatever character before the last cell of table , 
  then correct !

I tested 3.16 and 3.17-beta1, same results
Comment 1 Tim Allison 2017-09-05 16:26:06 UTC
This _may_ be related to: https://issues.apache.org/jira/browse/TIKA-1194
Comment 2 Dominik Stadler 2019-08-29 05:17:45 UTC
This should be fixed via r1866055 in trunk now, it seems Word has some "fake" cell at the end of tables, but this document does not have one. 

However at least LibreOffice "corrects" this when the document is saved after any change, but the original document still failed to find this cell, so we now better check if the last cell should be excluded or not.