poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 54228] sheet.rowIterator() not grabbing content out of xlsx 2010 file
Date Wed, 05 Dec 2012 12:23:48 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=54228

Yegor Kozlov <yegor@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
             Blocks|                            |53672
         Resolution|---                         |FIXED

--- Comment #5 from Yegor Kozlov <yegor@dinom.ru> ---
The cells that are not read are missing the R attribute (A1-style cell
reference). When POI reads worksheet data it collects cells into a map keyed by
columnIndex and the column index is derived from the R attribute. If R is
missing then columnIndex is 0 and all such cells are put into the same map
entry.

Here is sample xml:

<row>
    <c r="A1">
        <v>France</v>
    </c>
    <c>  
       <v>93</v>
    </c>
  </row>

The first cell is read and the second is not. Worse, it overwrites the
previosly read A1. 

Excel always writes R so POI assumed it is always present. It appears it is not
so. Excel resolves cells with missing R relative to the leftmost cell. That is,
if R is missing and the previously read cell is A2 then the R is A3, etc.
In the example above the cell is resolved as A2 because the previous cell is
A1. 

I committed the fix in r1417379, you are welcome to try with the latest build
from trunk. A link to daily builds is on the POI web site .

Yegor

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


Mime
View raw message