[prev in list] [next in list] [prev in thread] [next in thread] 

List:       poi-dev
Subject:    [Bug 58077] New: groupRow
From:       bugzilla () apache ! org
Date:       2015-06-26 8:53:42
Message-ID: bug-58077-47293 () https ! bz ! apache ! org/bugzilla/
[Download RAW message or body]

https://bz.apache.org/bugzilla/show_bug.cgi?id=58077

            Bug ID: 58077
           Summary: groupRow
           Product: POI
           Version: 3.12-FINAL
          Hardware: PC
            Status: NEW
          Severity: critical
          Priority: P2
         Component: SXSSF
          Assignee: dev@poi.apache.org
          Reporter: xiaozhulolo@126.com

Created attachment 32858
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32858&action=edit
Attached is the generated results

Run below code can generate xlsx with SXSSF and XSSF for comparison.
The one generated by XSSF is expected, the one generated by SXSSF won't group
rows correctly.

{code}
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;


public class TestSXSSF {

    public static void main(String args[]) throws FileNotFoundException,
IOException{
        File outputFile = new File("E:/testFile-actual.xlsx");
        SXSSFWorkbook sworkbook = new SXSSFWorkbook();
        creatXLSX(outputFile, sworkbook);

        File expectedoutputFile = new File("E:/testFile-expected.xlsx");
        XSSFWorkbook workbook = new XSSFWorkbook();
        creatXLSX(expectedoutputFile, workbook);
    }

    private static void creatXLSX(File outputFile, Workbook workbook)
            throws IOException, FileNotFoundException {
        Sheet sheet = workbook.createSheet();
        for(int i = 0; i < 200; i++)
            sheet.createRow(i);
        for(int i = 1; i < 200; i++){
            sheet.groupRow(i, i+10);
            i = i+11;
        }
        workbook.write(new FileOutputStream(outputFile));
        workbook.close();
    }
}

{code}

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic