public final class HorizontalPageBreak extends PageBreak
Following code demonstrates how to add PageBreaks to ExcelWorksheet.
int columnsPerPage = 6, rowsPerPage = 30;
int usedColumnsCount = ws.calculateMaxUsedColumns();
for (int i = columnsPerPage; i < usedColumnsCount; i += columnsPerPage)
ws.getVerticalPageBreaks().add(i);
for (int i = rowsPerPage; i < ws.getRows().size(); i += rowsPerPage)
ws.getHorizontalPageBreaks().add(i);
Modifier and Type | Method and Description |
---|---|
int |
getFirstColumn()
Index of the first column of the new page.
|
int |
getLastColumn()
Index of the last column of the new page.
|
int |
getRow()
Index of the first row of the new page.
|
void |
setFirstColumn(int value)
Index of the first column of the new page.
|
void |
setLastColumn(int value)
Index of the last column of the new page.
|
void |
setRow(int value)
Index of the first row of the new page.
|
public int getFirstColumn()
public int getLastColumn()
public int getRow()
public void setFirstColumn(int value)
Use 0 (first column) if you don't care.
public void setLastColumn(int value)
Use 255 (last column) if you don't care.
public void setRow(int value)
© GemBox Ltd. — All rights reserved.