public final class HorizontalPageBreakCollection extends PageBreakCollection<HorizontalPageBreak>
HorizontalPageBreak
).
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 |
---|---|
void |
add(int row)
Ads a new horizontal page break above the specified row.
|
void |
add(int row,
int firstColumn,
int lastColumn)
Ads a new horizontal page break above the specified row and within specified columns.
|
HorizontalPageBreak |
get(int index)
Gets the horizontal page break at the specified index.
|
void |
set(int index,
HorizontalPageBreak value)
Sets the horizontal page break at the specified index.
|
clear, iterator, remove, size
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public void add(int row)
row
- The zero-based index of the row.public void add(int row, int firstColumn, int lastColumn)
row
- The zero-based index of the row.firstColumn
- The zero-based index of the first column.lastColumn
- The zero-based index of the last column.public HorizontalPageBreak get(int index)
public void set(int index, HorizontalPageBreak value)
© GemBox d.o.o. — All rights reserved.