]> source.dussan.org Git - poi.git/commitdiff
Received comments about no documentation. Added a blurb in the quick-guide.
authorShawn Laubach <slaubach@apache.org>
Wed, 12 Feb 2003 15:05:16 +0000 (15:05 +0000)
committerShawn Laubach <slaubach@apache.org>
Wed, 12 Feb 2003 15:05:16 +0000 (15:05 +0000)
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

index fb2ca011e70bc6013280073c5d42fc58e35ab02e..e189d483931717ddcc82f048c8e91ee6fae57c50 100644 (file)
@@ -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">
     // 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);
     fileOut.close();