Problem with formulas when using "Swedish" language

Posted by: grapecity on 22 March 2018, 3:58 am EST

    • Post Options:
    • Link

    Posted 22 March 2018, 3:58 am EST

    When the language setting in Windows 10 is set to Swedish the spread control is not accepting formulas.

    Using the .SetFormula function a cell will accept a formula like this;

    “R56C122/R65C122”

    However, if I try to save this formula;

    “Round(R56C122/R65C122,0)”

    The cell will not accept the formula.

    What am I doing wrong?

    Thanks, Ed

  • Posted 23 March 2018, 12:45 am EST

    Hi Ed,

    I used the code below to set the formula for cell using R1C1 reference style and it seems to be working with Swedish settings.

    fpSpread1.ActiveSheet.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.R1C1;

    fpSpread1.ActiveSheet.Cells[0, 0].Formula = “RC[2]+RC[3]”;

    Please check the sample application attached at your end and let me know if the issue still persists.

    Thanks,

    Deepak Sharma

  • Posted 23 March 2018, 12:47 am EST

    Here is the sample application.

    SpreadWinFormulaCheckSwedish.zip

  • Posted 23 March 2018, 4:05 am EST

    Hi Deepak,

    The problem is not with a formula like the one you included in your example. The problem is when you add one of the function such as ROUND or IFERROR like I included in my post. For example,

    “Round(R56C122/R65C122,0)”

    Thanks, Ed

  • Posted 23 March 2018, 4:25 am EST

    Hi Deepak,

    I have some more information for you. I change the command I am using to set the formula from

    .SetFormula(56,122,“Round(R56C122/R65C122,0)”)

    to

    .Cell(56,122).Formula = “Round(R56C122/R65C122,0)”

    Although that didn’t make it work it does not generate the following error message

    An exception of type ‘FarPoint.Win.Spread.Model.ParseException’ occurred in FarPoint.Win.Spread.dll but was not handled in user code

    Also, when I click on the “Detail” link I see

    {“Invalid token was encountered.” & vbLf & “Error offset: 22”}

    Also, don’t know if this make any difference but I am working in VB.

    Ed

  • Posted 25 March 2018, 8:50 pm EST

    Ed,

    I’ve been struggling with this too on a German system since I upgraded from version 7.x to 10.x.

    Try this formula: .Cell(56,122).Formula = “Round(R56C122/R65C122;0)”

    I had to replace all commas with semicolons.

    Hope this helps

    Thomas

  • Posted 26 March 2018, 2:04 am EST

    Hello,

    I am able to replicate this issue at my end. I have submitted it as a bug to the development team. I will let you know once I get an update on this.

    The tracking id for this issue is 256220

    Thanks,

    Deepak Sharma

  • Posted 26 March 2018, 3:32 am EST

    Thomas,

    Thanks for that tip. I substituted a “;” for a " ," and that seems to work for me too.

    Most of our users are in English speaking countries but we also have a user in Iceland that is also having the same problem. Do you have experience with users in countries other than Germany that have the problem?

    Ed

  • Posted 26 March 2018, 5:53 pm EST

    Hi Ed,

    Each countries have their own list separator symbol, separator symbol and decimal symbol and because the culture, which you are using, uses “;” for separator symbol. This is why it made the formula with “,” not working. The formulas are needed to be set according to the culture settings.

    Thanks,

    Deepak Sharma

  • Posted 26 March 2018, 7:30 pm EST

    Ed,

    we’re only developing for german speaking client so I don’t have any experience with other countries.

    Thomas

  • Posted 27 March 2018, 8:14 pm EST

    Hi Thomas,

    The formula needs to be updated as per the regional settings.

    Thanks,

    Deepak Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels