[]
        
(Showing Draft Content)

IHPageBreak

Interface IHPageBreak


public interface IHPageBreak
Represents a horizontal page break.

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();
 
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deletes this horizontal page break.
    Gets the extent of the specified page break: the entire worksheet or only the print area.
    Gets the range that defines the page-break location.
  • Method Details

    • delete

      void delete()
      Deletes this horizontal page break.

      Removes this horizontal page break from the worksheet.

      
       IHPageBreak pageBreak = worksheet.getHPageBreaks().add(worksheet.getRange("A10"));
       pageBreak.delete();
       
    • getExtent

      PageBreakExtent getExtent()
      Gets the extent of the specified page break: the entire worksheet or only the print area.

      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();
       
      Returns:
      A PageBreakExtent value that indicates whether the page break applies to the entire worksheet or only within a print area.
    • getLocation

      IRange getLocation()
      Gets the range that defines the page-break location.

      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();
       
      Returns:
      The IRange that defines the page-break location.