Are you still using that same basic piece of code to copy the sheets between workbooks? If so I will take a look today and see how to modify that to use the cloneStyle() method.
--- On Wed, 9/3/08, gliao <[EMAIL PROTECTED]> wrote: From: gliao <[EMAIL PROTECTED]> Subject: Re: merge worksheets from mutiple xls files To: [email protected] Date: Wednesday, September 3, 2008, 10:12 AM Hi Nick, Thanks a lot. Is there any sample code about this? George Nick Burch wrote: > > On Fri, 29 Aug 2008, gliao wrote: >> Does the style including font and color? If it does, why it doen't copy >> font and color, even the code already set copyStyle boolean as true? Any >> idea. > > Styles are specific to just one workbook. I think you'll be wanting this: > > http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFCellStyle.html#cloneStyleFrom(org.apache.poi.hssf.usermodel.HSSFCellStyle) > > "Clones all the style information from another HSSFCellStyle, onto this > one. This HSSFCellStyle will then have all the same properties as the > source, but the two may be edited independently. Any stylings on this > HSSFCellStyle will be lost! The source HSSFCellStyle could be from another > HSSFWorkbook if you like. This allows you to copy styles from one > HSSFWorkbook to another." > > Nick > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/merge-worksheets-from-mutiple-xls-files-tp19168828p19293663.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]
