Bug 39965 - grouping row stopped at 32769 row
Summary: grouping row stopped at 32769 row
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-05 11:49 UTC by Dmitry Smirnov
Modified: 2008-05-11 01:53 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Smirnov 2006-07-05 11:49:56 UTC
hi all!
problem with grouping row. If  I do grouping 35000 rows at first time that all
well, but in next one grouping stopped at 32769 row.


see code below:

import java.io.FileOutputStream;
import java.io.IOException;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

public class Test {

    public static void main(String[] args) {
        long started = System.currentTimeMillis();
        FileOutputStream out = null;
        try {
            HSSFWorkbook book = new HSSFWorkbook();

            HSSFSheet sheet = book.createSheet("test");
            sheet.setRowSumsBelow(false);
            sheet.setRowSumsRight(false);
            for (int i = 1; i < 35000; i++) {
                HSSFRow row = sheet.createRow(i);
                HSSFCell cell = row.createCell((short) 0);
                cell.setCellType(HSSFCell.CELL_TYPE_STRING);
                cell.setCellValue("TEST");
                sheet.groupRow(i, i);
                sheet.groupRow(i, i);
            }

            out = new FileOutputStream("C:\\Test.xls");
            book.write(out);
            System.out.println("excel generated: " + (System.currentTimeMillis()
- started) + " ms [" + ((System.currentTimeMillis() - started) / 1000 / 60) + "
min]");

        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                if (out != null) {
                    out.flush();
                    out.close();
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
Comment 1 Josh Micich 2008-05-11 01:53:07 UTC
Re-tested in OK 3.1-beta1.

The problem is evident in when running this code in POI 3.0.  POI 3.0.2 tests OK.  It looks like the fix might have been in 3.0.2-beta1 with bug 43401 (svn r576519).