[]
        
(Showing Draft Content)

IPage

Interface IPage


public interface IPage
Represents the header and footer sections for a printed page.

Use this object to configure the text or picture shown in the left, center, or right section of a page header or footer.


 IPageSetup pageSetup = worksheet.getPageSetup();
 pageSetup.setDifferentFirstPageHeaderFooter(true);
 IPage firstPage = pageSetup.getFirstPage();
 firstPage.getCenterHeader().setText("Confidential");
 String text = firstPage.getCenterHeader().getText();
 
  • Method Details

    • getLeftHeader

      IHeaderFooter getLeftHeader()
      Gets the left header section for this page.

      Use the returned IHeaderFooter object to configure the text or picture shown in the left section of the header for this page.

      
       worksheet.getPageSetup().setDifferentFirstPageHeaderFooter(true);
       IHeaderFooter leftHeader = worksheet.getPageSetup().getFirstPage().getLeftHeader();
       leftHeader.setText("Quarterly Report");
       
      Returns:
      An IHeaderFooter object that represents the left section of the page header.
    • getCenterHeader

      IHeaderFooter getCenterHeader()
      Gets the center header section for this page.

      Use the returned IHeaderFooter object to configure the text or picture shown in the center section of the header for this page.

      
       worksheet.getPageSetup().setDifferentFirstPageHeaderFooter(true);
       IHeaderFooter centerHeader = worksheet.getPageSetup().getFirstPage().getCenterHeader();
       centerHeader.setText("Confidential");
       String text = centerHeader.getText();
       
      Returns:
      An IHeaderFooter object that represents the center section of the page header.
    • getRightHeader

      IHeaderFooter getRightHeader()
      Gets the right header section for this page.

      Use the returned IHeaderFooter object to configure the text or picture shown in the right section of the header for this page.

      
       worksheet.getPageSetup().setDifferentFirstPageHeaderFooter(true);
       IHeaderFooter rightHeader = worksheet.getPageSetup().getFirstPage().getRightHeader();
       rightHeader.setText("Page 1");
       
      Returns:
      An IHeaderFooter object that represents the right section of the page header.
    • getLeftFooter

      IHeaderFooter getLeftFooter()
      Gets the left footer section for this page.

      Use the returned IHeaderFooter object to configure the text or picture shown in the left section of the footer for this page.

      
       worksheet.getPageSetup().setDifferentFirstPageHeaderFooter(true);
       IHeaderFooter leftFooter = worksheet.getPageSetup().getFirstPage().getLeftFooter();
       leftFooter.setText("Prepared by Finance");
       String text = leftFooter.getText();
       
      Returns:
      An IHeaderFooter object that represents the left section of the page footer.
    • getCenterFooter

      IHeaderFooter getCenterFooter()
      Gets the center footer section for this page.

      Use the returned IHeaderFooter object to configure the text or picture shown in the center section of the footer for this page.

      
       worksheet.getPageSetup().setDifferentFirstPageHeaderFooter(true);
       IHeaderFooter centerFooter = worksheet.getPageSetup().getFirstPage().getCenterFooter();
       centerFooter.setText("Page Number");
       String text = centerFooter.getText();
       
      Returns:
      An IHeaderFooter object that represents the center section of the page footer.
    • getRightFooter

      IHeaderFooter getRightFooter()
      Gets the right footer section for this page.

      Use the returned IHeaderFooter object to configure the text or picture shown in the right section of the footer for this page.

      
       worksheet.getPageSetup().setDifferentFirstPageHeaderFooter(true);
       IHeaderFooter rightFooter = worksheet.getPageSetup().getFirstPage().getRightFooter();
       rightFooter.setText("Printed Copy");
       String text = rightFooter.getText();
       
      Returns:
      An IHeaderFooter object that represents the right section of the page footer.