if (val==null) {// means cache was cleared (in all cases???) MUST recalc
if(this.form.getWorkBook().getCalcMode() != WorkBookHandle.CALCULATE_EXPLICIT) {
this.calculate();
val= this.getVal();
} else {
val = new CalculationException(CalculationException.VALUE );
}
} else if (val instanceof String && ((String) val).startsWith("#"))
val= new CalculationException(CalculationException.getErrorCode((String)val));
} catch (Exception e) {
val = new CalculationException(CalculationException.VALUE );
}
if (val==null) {
Logger.logErr("FormulaHandle.getOOXML: unexpected null encountered when calculating formula: " + this.getCellAddress());
}
// Handle attributes for special cached values