public final class VerticalPageBreak 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 |
getColumn()
Gets index of the first column of the new page.
|
int |
getFirstRow()
Gets index of the first row of the new page.
|
int |
getLastRow()
Gets index of the last row of the new page.
|
void |
setColumn(int value)
Sets index of the first column of the new page.
|
void |
setFirstRow(int value)
Sets index of the first row of the new page.
|
void |
setLastRow(int value)
Sets index of the last row of the new page.
|
public int getColumn()
public int getFirstRow()
public int getLastRow()
public void setColumn(int value)
public void setFirstRow(int value)
Use 0 (first row) if you don't care.
public void setLastRow(int value)
Use 65535 (last row) if you don't care.
© GemBox Ltd. — All rights reserved.