diff --git a/components/fpspreadsheet/fpsexprparser.pas b/components/fpspreadsheet/fpsexprparser.pas index 62dbdc1ca..0611e01cf 100644 --- a/components/fpspreadsheet/fpsexprparser.pas +++ b/components/fpspreadsheet/fpsexprparser.pas @@ -3057,12 +3057,18 @@ procedure TsEqualExprNode.GetNodeValue(out AResult: TsExpressionResult); var LRes, RRes: TsExpressionResult; begin - if HasError(AResult) then - exit; - Left.GetNodeValue(LRes); Right.GetNodeValue(RRes); + if Left.HasError(AResult) and Right.HasError(AResult) then + begin + AResult := BooleanResult(LRes.ResError = RRes.ResError); + exit; + end; + + if HasError(AResult) then + exit; + if IsString(LRes) and IsString(RRes) then AResult := BooleanResult(ArgToString(LRes) = ArgToString(RRes)) else diff --git a/components/fpspreadsheet/fpspreadsheet.pas b/components/fpspreadsheet/fpspreadsheet.pas index 28a9f060a..437378383 100755 --- a/components/fpspreadsheet/fpspreadsheet.pas +++ b/components/fpspreadsheet/fpspreadsheet.pas @@ -3782,6 +3782,8 @@ begin isPercent := Pos('%', AValue) = Length(AValue); if isPercent then Delete(AValue, Length(AValue), 1); + ACell^.FormulaValue := ''; + if TryStrToCurrency(AValue, number, currSym, FWorkbook.FormatSettings) then begin WriteCurrency(ACell, number, nfCurrencyRed, -1, currSym); @@ -4322,7 +4324,8 @@ begin end; // Store formula in cell - ACell^.ContentType := cctFormula; + if AFormula <> '' then + ACell^.ContentType := cctFormula; ACell^.FormulaValue := AFormula; ChangedCell(ACell^.Row, ACell^.Col); end;