private static ValueEval evaluateFormulaValueEval(Book book, int sheetIndex, String formula, boolean ignoreDereference) {
final XelContext old = XelContextHolder.getXelContext();
try {
final VariableResolver resolver = BookHelper.getVariableResolver(book);
final FunctionMapper mapper = BookHelper.getFunctionMapper(book);
final XelContext ctx = new SimpleXelContext(resolver, mapper);
ctx.setAttribute("zkoss.zss.CellType", Object.class);
XelContextHolder.setXelContext(ctx);
return book.getFormulaEvaluator().evaluateFormulaValueEval(sheetIndex, formula, ignoreDereference);
} finally {
XelContextHolder.setXelContext(old);
}