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 2011/08/17 23:39:55 UTC

DO NOT REPLY [Bug 51673] New: groupRow in SXXSF.Sheet causes unreadable content

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

             Bug #: 51673
           Summary: groupRow in SXXSF.Sheet causes unreadable content
           Product: POI
           Version: 3.8-dev
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SXSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: pakbugzilla@gmail.com
    Classification: Unclassified


Created attachment 27399
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27399
Test Class for the GroupRow Issue

Using the groupRow method on an SXSSFSheet causes Excel to say it contains
unreadable data when opening the workbook.  The rows that were grouped were
still active in the sliding window.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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 51673] groupRow in SXXSF.Sheet causes unreadable content

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

--- Comment #5 from sweeny121@gmail.com ---
Yegor,

How do you group rows that have been flushed, i.e. are not in the memory window
now?

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


DO NOT REPLY [Bug 51673] groupRow in SXXSF.Sheet causes unreadable content

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

--- Comment #3 from Yegor Kozlov <ye...@dinom.ru> 2012-02-29 10:58:51 UTC ---
Support for grouping rows in SXSSF has been committed in r1295058

Please note that the rows being grouped must be in the memory window, you
cannot write 1000000 rows and then group rows 100-200. 
Workbook wb = new SXSSFWorkbook(100);

        Sheet sh = wb.createSheet();

        for (int rownum = 0; rownum < 1000; rownum++) {
            Row row = sh.createRow(rownum);
            if(rownum == 200)  {
                sh.groupRow(100, 200);
            }

        }

        for (int rownum = 0; rownum < 1000; rownum++) {
            Row row = sh.createRow(rownum);
        }
        sh.groupRow(100, 200);

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 51673] groupRow in SXXSF.Sheet causes unreadable content

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

--- Comment #2 from Nick Burch <ni...@alfresco.com> 2011-10-17 11:53:13 UTC ---
It would seem that groupRow will need to be directly implemented on SXSSFSheet,
and isn't something that can be delegated down to XSSFSheet

Someone would need to look at the method on XSSFSheet, review the actions it
performs, then add a similar thing to SXSSFSheet (working on the sometimes
different objects that SXSSF has to hand)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 51673] groupRow in SXXSF.Sheet causes unreadable content

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Yegor Kozlov <ye...@dinom.ru> 2012-02-29 11:01:17 UTC ---
Please ignore my previous post, I occasionally submitted it too early.

Support for grouping rows in SXSSF has been committed in r1295058

Please note that the rows being grouped must be in the memory window, you
cannot write 1000000 rows and then group rows 100-200. 

Examples:

        Workbook wb = new SXSSFWorkbook(100);

        Sheet sh = wb.createSheet();

        for (int rownum = 0; rownum < 1000; rownum++) {
            Row row = sh.createRow(rownum);
            if(rownum == 200)  {
                // correct: group rows while they are in memory
                sh.groupRow(100, 200);
            }

        }

        for (int rownum = 0; rownum < 1000; rownum++) {
            Row row = sh.createRow(rownum);
        }
        // wrong: rows are already flushed and groupRow has no effect
        sh.groupRow(100, 200);

Yegor

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 51673] groupRow in SXXSF.Sheet causes unreadable content

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

--- Comment #1 from Geeya <ge...@gmail.com> 2011-10-13 21:12:25 UTC ---
We tried to debug the issue and the issue is in groupRow() method of XSSFSheet
object (_sh) in SXSSFSheet. SXSSFSheet.groupRow() calls XSSFSheet.groupRow()
method. This method checks if the row exists already, if yes, then create a new
row. For some reasons _rows map is empty in XSSFSheet , whereas _rows in
SXSSFSheet is populated. So XSSFSheet.groupRow() method overwrites the content
by creating a new Row for the same index. In short, SXSSFSheet._rows and
XSSFSheet._rows are not in sync and so the rows are corrupted.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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