NativeExcel for .Net Developer's Reference

IWorksheet.HPageBreaks Property

Returns an IPageBreaks interface that represents the horizontal page breaks on the worksheet.

[Visual Basic]
PropertyReadOnlyHPageBreaksAsIPageBreaks
[C#]
IPageBreaksHPageBreaks{get;}
[C++]
__propertyIPageBreaks*get_HPageBreaks();
[JScript]
functiongetHPageBreaks():IPageBreaks

Property Value

IPageBreaks interface.

Example

This example adds horizontal page break before row five.

[C#]
book.Worksheets[1].HPageBreaks.Add(5);
[VisualBasic]
book.Worksheets(1).HPageBreaks.Add(5) 
[C++]
book->Worksheets->Item[1]->HPageBreaks->Add(5); 
This example displays the number of horizontal page breaks on worksheet one.
[C#]
Console.WriteLine(book.Worksheets[1].HPageBreaks.Count); 
[VisualBasic]
Console.WriteLine(book.Worksheets(1).HPageBreaks.Count) 
[C++]
Console::WriteLine(book->Worksheets->Item[1]->HPageBreaks->Count); 

See Also

IWorksheet Interface | NativeExcel Namespace | VPageBreaks Property | IPageBreaks Interface | ResetAllPageBreaks Method