Bug 47102 - setRowBreak() doesn't work for XSSFSheet
Summary: setRowBreak() doesn't work for XSSFSheet
Status: RESOLVED DUPLICATE of bug 48314
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.5-dev
Hardware: PC Windows XP
: P2 normal with 4 votes (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-27 02:28 UTC by Yuta Takahashi
Modified: 2011-06-24 13:13 UTC (History)
0 users



Attachments
Result Spreadsheet: no page break set (2.93 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2009-04-27 02:28 UTC, Yuta Takahashi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuta Takahashi 2009-04-27 02:28:27 UTC
Created attachment 23548 [details]
Result Spreadsheet: no page break set

The method "setRowBreak()" doesn't work for XSSFSheet.
The following code tries to create a sheet whose page break 
is set between the row "aaa" and "bbb". However, the result 
spreadsheet has no page break at print preview.

Code:
=======================================================
    XSSFWorkbook workbook = new XSSFWorkbook();
    Sheet sheet = workbook.createSheet();
    sheet.createRow(0).createCell(0).setCellValue("aaa");
    sheet.createRow(1).createCell(0).setCellValue("bbb");
    sheet.setRowBreak(0);
        
    String fileName = "./result.xlsx";

    FileOutputStream fileOut = new FileOutputStream(fileName);
    try {
        workbook.write(fileOut);
    } catch (Exception e) {
        System.out.println(e);
    } finally {
        fileOut.close();
    }
Comment 1 Yegor Kozlov 2011-06-24 13:13:04 UTC

*** This bug has been marked as a duplicate of bug 48314 ***