avik 2003/03/01 09:32:26 Modified: src/java/org/apache/poi/hssf/model Workbook.java Log: Support for changing sheet order submitted by Ruel Loehr. Probably should also add access to this in usermodel? Revision Changes Path 1.26 +13 -0 jakarta-poi/src/java/org/apache/poi/hssf/model/Workbook.java Index: Workbook.java =================================================================== RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/model/Workbook.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- Workbook.java 6 Feb 2003 10:29:44 -0000 1.25 +++ Workbook.java 1 Mar 2003 17:32:26 -0000 1.26 @@ -437,6 +437,19 @@ sheet.setSheetnameLength( (byte)sheetname.length() ); sheet.setCompressedUnicodeFlag( (byte)encoding ); } + + /** + * sets the order of appearance for a given sheet. + * + * @param sheetname the name of the sheet to reorder + * @param pos the position that we want to insert the sheet into (0 based) + */ + + public void setSheetOrder(String sheetname, int pos ) { + int sheetNumber = getSheetIndex(sheetname); + //remove the sheet that needs to be reordered and place it in the spot we want + boundsheets.add(pos, boundsheets.remove(sheetNumber)); + } /** * gets the name for a given sheet.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]