Closed mP1 closed 3 years ago
SpreadsheetEngineExpressionEvaluationContextExpressionReferenceExpressionFunction
line: engine.loadCell fails to load A2 returns nothing.
@Override public Optional<Expression> apply(final ExpressionReference reference) { Objects.requireNonNull(reference, "reference"); final SpreadsheetCellReference cellReference = SpreadsheetEngineExpressionEvaluationContextExpressionReferenceExpressionFunctionSpreadsheetExpressionReferenceVisitor.reference(reference, this.labelStore); final SpreadsheetDelta delta = this.engine.loadCell(cellReference, SpreadsheetEngineEvaluation.COMPUTE_IF_NECESSARY, this.context); final SpreadsheetCell cell = delta.cells() .stream() .filter(c -> c.reference().equalsIgnoreReferenceKind(cellReference)) .findFirst() .orElseThrow(() -> new ExpressionEvaluationException("Unknown cell reference " + reference)); final SpreadsheetFormula formula = cell.formula(); final Optional<SpreadsheetError> error = formula.error(); if (error.isPresent()) { throw new ExpressionEvaluationException(error.get().value()); } return formula.expression(); }
Invalid was working with A1, B1, C1 not A1, A2, A3, confusion over columns/rows
SpreadsheetEngineExpressionEvaluationContextExpressionReferenceExpressionFunction
line: engine.loadCell fails to load A2 returns nothing.