Hi Chad,
Thanks for your interest in Essential XlsIO.
To insert a page break in a worksheet, please insert vertical and horizontal page breaks at the specified cell by calling the Add method. Please refer the following code snippet which illustrates the above:
[C#]
//Entering text into the cells
sheet.Range[ "A1:M20" ].Text = "PageBreak";
// Giving Horizontal pagebreaks
sheet.HPageBreaks.Add( sheet.Range[ "A5" ] );
sheet.HPageBreaks.Add( sheet.Range[ "A10" ] );
sheet.HPageBreaks.Add( sheet.Range[ "A15" ] );
// Giving Vertical pagebreaks
sheet.VPageBreaks.Add( sheet.Range[ "B5" ] );
sheet.VPageBreaks.Add( sheet.Range[ "E10" ] );
sheet.VPageBreaks.Add( sheet.Range[ "K15" ] );
Here is the sample for your reference:
PageBreak.zipKindly take a look at the sample above and let me know if you have any other questions.
Regards,
Melba