try best effort clone of styles if types don't match

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925525 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2025-05-12 22:54:46 +00:00
parent 2f55495ba9
commit cbf6577172

View File

@ -858,10 +858,11 @@ public final class HSSFCellStyle implements CellStyle, Duplicatable {
public void cloneStyleFrom(CellStyle source) {
if(source instanceof HSSFCellStyle) {
this.cloneStyleFrom((HSSFCellStyle)source);
} else if (_hssfWorkbook != null) {
} else {
CellUtil.cloneStyle(source, this, _hssfWorkbook);
}
}
public void cloneStyleFrom(HSSFCellStyle source) {
// First we need to clone the extended format
// record