Fault in spreadsheet calculations

2 posts, 0 answers
  1. Robby
    Robby avatar
    5 posts
    Member since:
    Jul 2012

    Posted 08 Aug 2013 Link to this post

    Hi,

    I will test this control with simple calculations. My first test was to device a cell value with 2: =A1/2. The result in the spreadsheet returns: 5
    This problem occurs in the online demo application and also in a small test of me:

    private void Button2_Click(object sender, RoutedEventArgs e)
    {
        Workbook workbook = new Workbook();
        Worksheet worksheet = workbook.Worksheets.Add();
        worksheet.Cells[0, 0].SetValue(1);
     
        worksheet.Cells[0, 1].SetValue("=A1/2");
        Excel.Workbook = workbook;
    }

    When I set the current culture to English, it works fine:
    Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");

    It will go wrong when set it to:
    Thread.CurrentThread.CurrentCulture = new CultureInfo("nl-BE");
  2. Boryana
    Admin
    Boryana avatar
    330 posts

    Posted 13 Aug 2013 Link to this post

    Hello Robby,

    Thank you for writing.

    Indeed RadSpreadsheet does not calculate divisions correctly if the decimal separator of the current culture is a comma. The issue is already addressed and it will be included in the next official release - Q3 2013. We will also include the fix in the following LIB, so that you will be able to test the functionality next week.

    Thank you for your report. Your Telerik points have been updated.

    Regards,
    Boryana
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top