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