You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by sl...@apache.org on 2003/02/12 16:05:16 UTC

cvs commit: jakarta-poi/src/documentation/xdocs/hssf quick-guide.xml

slaubach    2003/02/12 07:05:16

  Modified:    src/documentation/xdocs/hssf quick-guide.xml
  Log:
  Received comments about no documentation.  Added a blurb in the quick-guide.
  
  Revision  Changes    Path
  1.14      +21 -0     jakarta-poi/src/documentation/xdocs/hssf/quick-guide.xml
  
  Index: quick-guide.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/documentation/xdocs/hssf/quick-guide.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- quick-guide.xml	6 Feb 2003 10:29:43 -0000	1.13
  +++ quick-guide.xml	12 Feb 2003 15:05:16 -0000	1.14
  @@ -38,6 +38,7 @@
                       <li><link href="#Zoom">Set the zoom magnification for a sheet.</link></li>
                       <li><link href="#Splits">Create split and freeze panes.</link></li>
                       <li><link href="#Repeating">Repeating rows and columns.</link></li>
  +                    <li><link href="#HeaderFooter">Headers and Footers.</link></li>
                   </ul>
               </section>
               <section title="Features">
  @@ -645,6 +646,26 @@
       wb.setRepeatingRowsAndColumns(0,0,2,-1,-1);
       // 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();
  +                    </source>
  +                </section>
  +                <anchor id="HeaderFooter"/>
  +                <section title="Headers and Footers">
  +                    <p>
  +                        Example is for headers but applies directly to footers.
  +                    </p>
  +                    <source>
  +    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);