slaubach 2002/10/07 10:15:19
Modified: src/documentation/xdocs/hssf quick-guide.xml
Log:
Added quickguide to demonstrate how to set a sheet as selected in a workbook.
Revision Changes Path
1.11 +16 -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.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- quick-guide.xml 7 Oct 2002 16:26:24 -0000 1.10
+++ quick-guide.xml 7 Oct 2002 17:15:19 -0000 1.11
@@ -33,6 +33,7 @@
<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>
<li><link href="#ShiftRows">Shift rows.</link></li>
+ <li><link href="#SelectSheet">Set a sheet as
selected.</link></li>
</ul>
</section>
<section title="Features">
@@ -458,6 +459,21 @@
// Shift rows 6 - 11 on the spreadsheet to the top (rows 0 - 5)
sheet.shiftRows(5, 10, -5);
+
+ FileOutputStream fileOut = new FileOutputStream("workbook.xls");
+ wb.write(fileOut);
+ fileOut.close();
+ </source>
+ </section>
+
+ <anchor id="SelectSheet"/>
+ <section title="Set a sheet as selected">
+ <source>
+ HSSFWorkbook wb = new HSSFWorkbook();
+ HSSFSheet sheet = wb.createSheet("row sheet");
+ sheet.setSelected(true);
+
+ // Create various cells and rows for spreadsheet.
FileOutputStream fileOut = new FileOutputStream("workbook.xls");
wb.write(fileOut);
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>