Received comments about no documentation. Added a blurb in the quick-guide.

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
This commit is contained in:
Shawn Laubach 2003-02-12 15:05:16 +00:00
parent 8ca979d116
commit caf032a84f

View File

@ -38,6 +38,7 @@
<li><link href="#Zoom">Set the zoom magnification for a sheet.</link></li> <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="#Splits">Create split and freeze panes.</link></li>
<li><link href="#Repeating">Repeating rows and columns.</link></li> <li><link href="#Repeating">Repeating rows and columns.</link></li>
<li><link href="#HeaderFooter">Headers and Footers.</link></li>
</ul> </ul>
</section> </section>
<section title="Features"> <section title="Features">
@ -646,6 +647,26 @@
// Set the the repeating rows and columns on the second sheet. // Set the the repeating rows and columns on the second sheet.
wb.setRepeatingRowsAndColumns(1,4,5,1,2); 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"); FileOutputStream fileOut = new FileOutputStream("workbook.xls");
wb.write(fileOut); wb.write(fileOut);
fileOut.close(); fileOut.close();