Bug in ROUND formula with german system settings

Posted by: maya.halter on 11 November 2021, 1:12 am EST

  • Posted 11 November 2021, 1:12 am EST - Updated 29 September 2022, 6:33 am EST

    Hi,

    We found a bug in the ROUND() formula implementation when using Documents .NET with german system settings.

    
    worksheet.Range["A1"].Formula = "ROUND(0.15,2)"
    var expectedResult = 0.15;
    var actualResult = 15;
    
    
    
    worksheet.Range["A1"].Formula = "ROUND(18.247,2)";
    var expectedResult = 18.25;
    var actualResult = 18247;
    
    

    We tried the same operations on a computer with english (US) system settings and there we got the correct values for both rounding issues.

    We tried to solve this issue by setting the workbook culture to US, but this still returned the same wrong result on a german system.

    
    workbook = new Workbook()
     {
          Culture = CultureInfo.GetCultureInfo("en-US")
     };
    
    

    Is there a workaround or fix for this issue?

    Thank you in advance!

    Regards,

    Maya

  • Posted 11 November 2021, 10:16 pm EST

    Hello Maya,

    Ted Asiamah from your organization has reported the same case and our developers that it is a bug that will get fixed in the next HF release.

    Regards,

    Prabhat Sharma.

Need extra support?

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

Learn More

Forum Channels