[]
Use IWorksheet.getHPageBreaks() to add or access horizontal page breaks within the print area. The break location is defined by an IRange; horizontal page breaks are aligned with the top edge of that range.
IHPageBreak hPageBreak = worksheet.getHPageBreaks().add(worksheet.getRange("A4"));
IRange location = hPageBreak.getLocation();
PageBreakExtent extent = hPageBreak.getExtent();
hPageBreak.delete();
voiddelete()Removes this horizontal page break from the worksheet.
IHPageBreak pageBreak = worksheet.getHPageBreaks().add(worksheet.getRange("A10"));
pageBreak.delete();
The returned value indicates whether the horizontal page break spans the full sheet width ( PageBreakExtent.PageBreakFull) or applies only within the print area ( PageBreakExtent.PageBreakPartial).
IHPageBreak hPageBreak = worksheet.getHPageBreaks().add(worksheet.getRange("A4"));
PageBreakExtent extent = hPageBreak.getExtent();
PageBreakExtent value that indicates whether the page break applies to the entire worksheet or only within a print area.Horizontal page breaks are aligned with the top edge of the returned range.
IHPageBreak pageBreak = worksheet.getHPageBreaks().add(worksheet.getRange("A10"));
IRange location = pageBreak.getLocation();
IRange that defines the page-break location.