Click or drag to resize
PageBreak Class
Base class for all page breaks.
Inheritance Hierarchy

Namespace: GemBox.Spreadsheet
Assembly: GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 39.3.30.1198
Syntax
public abstract class PageBreak
Examples

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.VerticalPageBreaks.Add(i);

for (int i = rowsPerPage; i < ws.Rows.Count; i += rowsPerPage)
    ws.HorizontalPageBreaks.Add(i);
See Also