Thanks for getting back to me. I may have come up with a solution myself. It is to get the cellStyle from the cellthat is being copied over. Check to see if the style exists in the new workbook the cell is being copied to. If it does exists thenapply that to the new cell and if id doesn't exist add it to the style table and then apply it to the newly created cell. Do you think that would work? thanksmark
Nick Burch wrote: > > On Fri, 11 Jul 2008, mjw_85uk wrote: >> However, this is not the best solution as when you try and open a >> spreadsheet in MS Excel it complains about having to many fonts and >> styles. Therefore, my next solution was to simply copy the style from >> the template cell into the newly created cell in the new spreadsheet >> like: > > That won't work, as the style references lots of records that are only > present in one of the two workbooks. > > I've had a go at writing some code to clone the records from one workbook > to another, when copying the style over. It looks promising, but I still > need to write some tests for it. Hopefully I'll finish and commit it to > svn this weekend > > Nick > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/HSSFCellStyle-help-tp18401553p18404091.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]
