acoliver 2002/09/04 17:32:37 Modified: src/documentation/xdocs/hssf quick-guide.xml Log: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12281 Revision Changes Path 1.8 +41 -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.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- quick-guide.xml 15 Aug 2002 14:13:34 -0000 1.7 +++ quick-guide.xml 5 Sep 2002 00:32:37 -0000 1.8 @@ -30,6 +30,8 @@ <li><link href="#ReadWriteWorkbook">Reading and writing</link></li> <li><link href="#NewLinesInCells">Use newlines in cells.</link></li> <li><link href="#DataFormats">Create user defined data formats.</link></li> + <li><link href="#PrintArea">Set print area for a sheet.</link></li> + <li><link href="#FooterPageNumbers">Set page numbers on the footer of a sheet.</link></li> </ul> </section> <section title="Features"> @@ -356,6 +358,45 @@ fileOut.close(); </source> </section> + <anchor id="PrintArea"/> + <section title="Set Print Area to One Page"> + <source> + HSSFWorkbook wb = new HSSFWorkbook(); + HSSFSheet sheet = wb.createSheet("format sheet"); + HSSFPrintSetup ps = sheet.getPrintSetup() + + sheet.setAutobreaks(true) + + ps.setFitHeight((short)1); + ps.setFitWidth((short)1); + + + // Create various cells and rows for spreadsheet. + + FileOutputStream fileOut = new FileOutputStream("workbook.xls"); + wb.write(fileOut); + fileOut.close(); + </source> + </section> + <anchor id="FooterPageNumbers"/> + <section title="Set Page Numbers on Footer"> + <source> + HSSFWorkbook wb = new HSSFWorkbook(); + HSSFSheet sheet = wb.createSheet("format sheet"); + HSSFFooter footer = sheet.getFooter() + + footer.setRight( "Page " + HSSFFooter.page() + " of " + HSSFFooter.numPages() ); + + + + // Create various cells and rows for spreadsheet. + + FileOutputStream fileOut = new FileOutputStream("workbook.xls"); + wb.write(fileOut); + fileOut.close(); + </source> + </section> + </section> </section>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
