Hi, Requirement: Copy the sheet from one workbook to another workbook. (which includes copying format etc).
//code to fetch workbooks, sheets, rows, cells HSSFCell oldCell, HSSFCell newCell; newCell.setCellStyle(oldCell.getCellStyle()); Old Jar: Using the old jar file (the version before poi-3.2-FINAL-20081019.jar) , implemented code to copy HSSFCell from one worksheet to another using the above code. It all worked fine. New Jar: Upgraded to the new jar poi-3.2-FINAL-20081019.jar and the above code throws the following exception: "javax.servlet.ServletException: This Style does not belong to the supplied Workbook. Are you trying to assign a style from one workbook to the cell of a differnt workbook?" Solution: If the above code should be replaced with some other code(methods), can someone please clarify on how to implement copying worksheet from one workbook to another without loosing the format/style etc. Thanks a lot! Appreciate your help. -- View this message in context: http://www.nabble.com/setCellStyle-%28HSSFStyle%29-in-poi-3.2-FINAL-20081019.jar-throws-exception-tp23198948p23198948.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
