[]
Represents the collection of horizontal page breaks within the print area.
Use this collection to enumerate existing horizontal page breaks, retrieve a page break by index, or add a new break above a specified range. Obtain an instance from HPageBreaks.
public interface IHPageBreaks : IEnumerable
Public Interface IHPageBreaks
Inherits IEnumerable
worksheet.HPageBreaks.Add(worksheet.Range["A10"]);
IHPageBreaks pageBreaks = worksheet.HPageBreaks;
IHPageBreak pageBreak = pageBreaks[0];
| Name | Description |
|---|---|
| Count | Returns the number of horizontal page breaks in the collection. Use this property to determine how many horizontal page breaks are currently in the collection returned by HPageBreaks. |
| this[int] | Gets the IHPageBreak by index. The index is zero-based. An IndexOutOfRangeException is thrown if the index is outside the collection. |
| Name | Description |
|---|---|
| Add(IRange) | Adds a horizontal page break within the print area. The new page break is inserted above the specified range. Use HPageBreaks to access the collection of horizontal page breaks for a worksheet. |