I've a problem with the library apache poi, i want to copy the style of a
cell and to do this i use the function cloneStyleFrom() and all works good
except the copy of borders style. I don't understand if is my mistake or if
this function doesn't implements the copy of the borders style.

This is my code:

int stHashCode = oldCell.getCellStyle().hashCode();
XSSFCellStyle newCellStyle = styleMap.get(stHashCode);
if (newCellStyle == null) {
    newCellStyle = newCell.getSheet().getWorkbook().createCellStyle();
    newCellStyle.cloneStyleFrom(oldCell.getCellStyle());
    styleMap.put(stHashCode, newCellStyle);
}
    newCell.setCellStyle(newCellStyle);

I use Apache POI 2.8.
Someone can help me? Where is my mistake?

Thanks a lot



--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/APACHE-POI-cloneStyleFrom-doesn-t-copy-BorderStyle-tp5711249.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]

Reply via email to