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: [email protected]
Reporter: [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]