EasyXLS

Page breaks

EasyXLS™ library allows you to insert page breaks on rows or columns for a sheet of an Excel file. The page breaks separate the pages when the document is printed.

Source code sample

The below example shows how to export an Excel file with page breaks placed on different rows of the sheet.

C#.NET
VB.NET
C++
Java
PHP
ASP
VB6
VBS
Coldfusion
Python

The screen shot provides an example of an Excel report that has a visible page break at row 21. The page break preview layout is selected.

Excelpage break per rows, Excel page break per columns

Page breaks on rows

EasyXLS allows setting the page breaks on rows using ExcelTable.easy_insertPageBreakAtRow method.

Page breaks on columns

EasyXLS allows setting the page breaks per columns using ExcelTable.easy_insertPageBreakAtColumn method.

Page break preview

In order to visualize the printable area and the pagination, the view must be set on "Page Break Preview" mode using ExcelWorksheet.setPageBreakPreview method.


Available for: Professional, Excel Writer, Excel Reader
Go to top

EasyXLS Excel libraries:

.NET
.NET Excel Library
full .NET version to import, export or convert Excel files
COM+ Excel Library
full COM+ version to import, export or convert Excel files
-
Java
Java Excel Library
full Java version to import, export or convert Excel files
Download EasyXLS™ Excel Library for .NET and Java

File formats:

MS Excel 97 - 2003
MS Excel 2007 - 2019
MS Excel 2021
Office 365
XLSXXLSMXLSBXLS
XMLHTMLCSVTXT