From caf032a84f0576a47dd25e6d04d7303c049102d1 Mon Sep 17 00:00:00 2001 From: Shawn Laubach Date: Wed, 12 Feb 2003 15:05:16 +0000 Subject: [PATCH] Received comments about no documentation. Added a blurb in the quick-guide. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353005 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/xdocs/hssf/quick-guide.xml | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/documentation/xdocs/hssf/quick-guide.xml b/src/documentation/xdocs/hssf/quick-guide.xml index fb2ca011e..e189d4839 100644 --- a/src/documentation/xdocs/hssf/quick-guide.xml +++ b/src/documentation/xdocs/hssf/quick-guide.xml @@ -38,6 +38,7 @@
  • Set the zoom magnification for a sheet.
  • Create split and freeze panes.
  • Repeating rows and columns.
  • +
  • Headers and Footers.
  • @@ -646,6 +647,26 @@ // Set the the repeating rows and columns on the second sheet. wb.setRepeatingRowsAndColumns(1,4,5,1,2); + FileOutputStream fileOut = new FileOutputStream("workbook.xls"); + wb.write(fileOut); + fileOut.close(); + +
    + +
    +

    + Example is for headers but applies directly to footers. +

    + + HSSFWorkbook wb = new HSSFWorkbook(); + HSSFSheet sheet = wb.createSheet("new sheet"); + + HSSFHeader header = sheet.getHeader(); + header.setCenter("Center Header"); + header.setLeft("Left Header"); + header.setRight(HSSFHeader.font("Stencil-Normal", "Italic") + + HSSFHeader.fontSize((short) 16) + "Right w/ Stencil-Normal Italic font and size 16"); + FileOutputStream fileOut = new FileOutputStream("workbook.xls"); wb.write(fileOut); fileOut.close();