]> source.dussan.org Git - poi.git/commitdiff
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12281
authorAndrew C. Oliver <acoliver@apache.org>
Thu, 5 Sep 2002 00:32:37 +0000 (00:32 +0000)
committerAndrew C. Oliver <acoliver@apache.org>
Thu, 5 Sep 2002 00:32:37 +0000 (00:32 +0000)
PR:
Obtained from:
Submitted by:
Reviewed by:

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352837 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/xdocs/hssf/quick-guide.xml

index 3e16013fc34dc0e44dcd970232e88214ed23048d..0d1bca182172741c1438175e534ae79c0ffff0cc 100644 (file)
@@ -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">
     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>