You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2012/11/30 21:34:09 UTC

[Bug 54228] New: sheet.rowIterator() not grabbing content out of xlsx 2010 file

https://issues.apache.org/bugzilla/show_bug.cgi?id=54228

            Bug ID: 54228
           Summary: sheet.rowIterator() not grabbing content out of xlsx
                    2010 file
           Product: POI
           Version: 3.7
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: james.clendennen@morningstar.com
    Classification: Unclassified

Created attachment 29658
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29658&action=edit
File that won't convert correctly

Hi,

When trying to use the POI class to grab content from the attached xlsx sheet,
the sheet.rowIterator() method is returning rows with no content.


For example:

itrRow=sheet.rowIterator();

Row      row        = itrRow.next();

When iterating through the cells of "row", everything is blank and it seems to
be coming from the sheet.rowIterator returning a row without the content. 
Thanks

-- 
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


[Bug 54228] sheet.rowIterator() not grabbing content out of xlsx 2010 file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54228

--- Comment #4 from Mark B <ma...@tiscali.co.uk> ---
Ah, I understand now after assuming that you were asking why the Iterator would
returned rows that you did not expect to see; those otherwise blank styled rows
on your sheet. Instead, it seems to be pretty much the whole of the populated
portion of the sheet that is not returned to you. Will take a look later.

-- 
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


[Bug 54228] sheet.rowIterator() not grabbing content out of xlsx 2010 file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54228

Yegor Kozlov <ye...@dinom.ru> changed:

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

--- Comment #5 from Yegor Kozlov <ye...@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


[Bug 54228] sheet.rowIterator() not grabbing content out of xlsx 2010 file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54228

James <ja...@morningstar.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|3.7                         |3.8

--- Comment #3 from James <ja...@morningstar.com> ---
Hi,

Thanks for the assistance.  I made a mistake before and we are already using
3.8.  Sorry for any confusion.  The only row it returns anything for in
"midcon-pjm" sheet is the one with the date on it.  It doesn't return anything
for rows 10 - 87.  Let me know if you need any more information and thanks
again.

-- 
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


[Bug 54228] sheet.rowIterator() not grabbing content out of xlsx 2010 file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54228

Mark B <ma...@tiscali.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Mark B <ma...@tiscali.co.uk> ---
I have just had a look ay your file and would like to ask which rows are
reporting they contain nothing? I suspect that these will be the styled rows
that do not contain any cells. The reason why you are seeing POI report these
is that Excel will still create an entry for that row in the xml markup for the
sheet so that it can record the style information for it.

Can you check this please by printing out the numbers of the 'problematic' rows
and then comparing them to your source file.

-- 
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


[Bug 54228] sheet.rowIterator() not grabbing content out of xlsx 2010 file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54228

Yegor Kozlov <ye...@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #2 from Yegor Kozlov <ye...@dinom.ru> ---
Please try with the latest build form trunk. POI-3.7 is two years old and many
bugs have been fixed since then.

-- 
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