I need a new XSSFCellStyle
because I have to change some stylings.
I only have a XSSFCellStyle
- I don't have the XSSFCell
it belongs to. Thus I also don't have access to the related XSSFSheet
or XSSFWorkbook
.
XSSFWorkbook
therefore I can't call workbook.createCellStyle()
.XSSFCellStyle
constructor needs at least a StylesTable
which I also don't have (because I couldn't find a way to get it from the old XSSFCellStyle
).cellStyle.cloneStyleFrom(XSSFCellStyle Source)
doesn't really clone the style (it's more or less just a copy with the same pointers, so if I change something on one cellStyle the "cloned" cellStyle has the same changes).How can I get a new XSSFCellStyle
?
Regards, winklerrr
There is a clone()
method available on the XSSFCellStyle
.
I don't know why but I didn't see it in the first place. My bad.