Calc+BASIC: Creating formula

Code

Sub Test
        	ThisComponent.CurrentController.ActiveSheet.getCellByPosition(2, 0).String 	= "Formula"
        	ThisComponent.CurrentController.ActiveSheet.getCellByPosition(0, 1).Value 	= 10
        	ThisComponent.CurrentController.ActiveSheet.getCellByPosition(1, 1).Value 	= 20
        	ThisComponent.CurrentController.ActiveSheet.getCellByPosition(2, 1).Formula = "=A2+B2"
        	ThisComponent.CurrentController.ActiveSheet.getCellByPosition(0, 2).String 	= "AA"
        	ThisComponent.CurrentController.ActiveSheet.getCellByPosition(1, 2).String 	= "BB"
        	ThisComponent.CurrentController.ActiveSheet.getCellByPosition(2, 2).Formula = "=LEFT(A3,1)&RIGHT(B3,1)"
        End Sub

Cell C2 is correct. Cell C3 is incorrect.
image description

Why is Cell C4 created manually correct?
image description

LOCalcBASIC_GetStringOrValueFromFormula_AskLibreOffice.ods

[Edit] format for readability

Please remove tag common as this is clearly a calc question. Erroneous tagging messes up the automatic notification system to those monitoring the tags. Use the retag link. Thanks.

Use a semicolon instead of a comma in formulas that you enter in a cell:

Sub Test
        With ThisComponent.CurrentController.ActiveSheet        
        	.getCellByPosition(2, 0).String  = "Formula"
        	.getCellByPosition(0, 1).setValue (10)
        	.getCellByPosition(1, 1).setValue (20)
        	.getCellByPosition(2, 1).setFormula("=A2+B2") 
        	.getCellByPosition(0, 2).setString("AA") 
        	.getCellByPosition(1, 2).setString("BB")
        	.getCellByPosition(2, 2).setFormula("=LEFT(A3;1)&RIGHT(B3;1)")
        End With 
End Sub

Dear @JohnSUN,

Thank you.