From b96718de91b6799d35d3f06fdbf9e7da03dc8100 Mon Sep 17 00:00:00 2001 From: Danny Muid Date: Thu, 6 Mar 2003 21:04:47 +0000 Subject: [PATCH] Added PrintArea documentation and corrected spelling for contrib description git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353022 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/xdocs/hssf/quick-guide.xml | 23 +++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/documentation/xdocs/hssf/quick-guide.xml b/src/documentation/xdocs/hssf/quick-guide.xml index e189d4839..d4d3be4ab 100644 --- a/src/documentation/xdocs/hssf/quick-guide.xml +++ b/src/documentation/xdocs/hssf/quick-guide.xml @@ -31,7 +31,8 @@
  • Reading and writing
  • Use newlines in cells.
  • Create user defined data formats.
  • -
  • Set print area for a sheet.
  • +
  • Fit sheet to one page
  • +
  • Set print area for a sheet.
  • Set page numbers on the footer of a sheet.
  • Shift rows.
  • Set a sheet as selected.
  • @@ -432,6 +433,22 @@ 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("Sheet1"); + wb.setPrintArea(0, "Sheet1!$A$1:$C$2"); + //sets the print area for the first sheet + + // Create various cells and rows for spreadsheet. FileOutputStream fileOut = new FileOutputStream("workbook.xls"); @@ -459,8 +476,8 @@
    - -
    + +

    The convience functions live in contrib and provide utility features such as setting borders around merged