Click or drag to resize
ExcelWorksheetVerticalPageBreaks Property
Gets collection of all vertical page breaks (VerticalPageBreak) in the worksheet.

Namespace: GemBox.Spreadsheet
Assembly: GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 41.3.30.1000
Syntax
public VerticalPageBreakCollection VerticalPageBreaks { get; }

Property Value

Type: VerticalPageBreakCollection
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