From 5793d7ceb8d09d91341cced5d562c0d17753852d Mon Sep 17 00:00:00 2001 From: "Andrew C. Oliver" Date: Thu, 5 Sep 2002 00:32:37 +0000 Subject: [PATCH] http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12281 PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352837 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/xdocs/hssf/quick-guide.xml | 41 ++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/documentation/xdocs/hssf/quick-guide.xml b/src/documentation/xdocs/hssf/quick-guide.xml index 3e16013fc3..0d1bca1821 100644 --- a/src/documentation/xdocs/hssf/quick-guide.xml +++ b/src/documentation/xdocs/hssf/quick-guide.xml @@ -30,6 +30,8 @@
  • Reading and writing
  • Use newlines in cells.
  • Create user defined data formats.
  • +
  • Set print area for a sheet.
  • +
  • Set page numbers on the footer of a sheet.
  • @@ -356,6 +358,45 @@ fileOut.close();
    + +
    + + HSSFWorkbook wb = new HSSFWorkbook(); + HSSFSheet sheet = wb.createSheet("format sheet"); + HSSFPrintSetup ps = sheet.getPrintSetup() + + sheet.setAutobreaks(true) + + ps.setFitHeight((short)1); + ps.setFitWidth((short)1); + + + // Create various cells and rows for spreadsheet. + + FileOutputStream fileOut = new FileOutputStream("workbook.xls"); + wb.write(fileOut); + fileOut.close(); + +
    + +
    + + HSSFWorkbook wb = new HSSFWorkbook(); + HSSFSheet sheet = wb.createSheet("format sheet"); + HSSFFooter footer = sheet.getFooter() + + footer.setRight( "Page " + HSSFFooter.page() + " of " + HSSFFooter.numPages() ); + + + + // Create various cells and rows for spreadsheet. + + FileOutputStream fileOut = new FileOutputStream("workbook.xls"); + wb.write(fileOut); + fileOut.close(); + +
    + -- 2.39.5