fix class cast issur recently introduced in BaseXSSFFormulaEvaluator
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1844311 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d24b4492f0
commit
1f9a0caf2e
@ -73,9 +73,14 @@ public abstract class BaseXSSFFormulaEvaluator extends BaseFormulaEvaluator {
|
||||
}
|
||||
|
||||
protected void setCellType(Cell cell, CellType cellType) {
|
||||
if (cell instanceof XSSFCell) {
|
||||
EvaluationWorkbook evaluationWorkbook = getEvaluationWorkbook();
|
||||
BaseXSSFEvaluationWorkbook xewb = BaseXSSFEvaluationWorkbook.class.isAssignableFrom(evaluationWorkbook.getClass()) ? (BaseXSSFEvaluationWorkbook) evaluationWorkbook : null;
|
||||
|
||||
((XSSFCell) cell).setCellType(cellType, xewb);
|
||||
} else {
|
||||
// could be an SXSSFCell
|
||||
cell.setCellType(cellType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user