aboutsummaryrefslogtreecommitdiffstats
path: root/src/documentation/xdocs/hssf
diff options
context:
space:
mode:
Diffstat (limited to 'src/documentation/xdocs/hssf')
-rw-r--r--src/documentation/xdocs/hssf/quick-guide.xml21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/documentation/xdocs/hssf/quick-guide.xml b/src/documentation/xdocs/hssf/quick-guide.xml
index fb2ca011e7..e189d48393 100644
--- a/src/documentation/xdocs/hssf/quick-guide.xml
+++ b/src/documentation/xdocs/hssf/quick-guide.xml
@@ -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">
@@ -651,6 +652,26 @@
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();
+ </source>
+ </section>
</section>
</section>
</body>