DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=23951>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=23951 [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[EMAIL PROTECTED] ------- Additional Comments From [EMAIL PROTECTED] 2007-03-27 12:44 ------- Here's a better workaround for using setSheetOrder() without using cloneSheet() method. The current open-source version will not support sheet cloning if the sheet has any embedded images or objects. As you've probably found out, setSheetOrder() only swaps the actual sheet content -- not the sheet's name. So you'll need to manually set that on your own. As regards to the contents not swapping properly, try not to think about it as 'sheet 3 BEFORE sheet 1', but rather the opposite direction. So if you write the code as: workbook.setSheetName(sheetNameWhereIndexIsZero, 3); //this will work. Anyways, here's my arbitrary positioned workaround: //sheetName buffer. int intTotalSheet = workbbook.getNumberOfSheets(); String[] straSheetName = new String[intTotalSheet]; for (int b=0; b<intTotalSheet; b++) straSheetName[b] = workbook.getSheetName(b); workbook.setSheetName(intTotalSheet-1, "newSheet"); workbook.setSheetName(0, SHEET_NAME); for(int a = 1; a < intTotalSheet; a++) { workbook.setSheetName(a, straSheetName[a-1]); } workbook.setSheetOrder(wb.getSheetName(0), intTotalSheet-1); -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta POI Project: http://jakarta.apache.org/poi/