Declined
Last Updated: 21 Feb 2022 13:05 by ADMIN
Florian
Created on: 15 Oct 2021 14:00
Category: Spreadsheet
Type: Bug Report
1
The Text() function does not format a cell with decimal separator comma

### Bug report

When the property "useCultureDecimals" is enabled in a culture where the decimal separator is the comma, the function Text() does not format numbers correctly.

### Reproduction of the problem

1. Set a culture where the decimal separator is the comma (i.e. "da-DK");

2. Create a Spreadsheet and enable the property "useCultureDecimals";

3. Enter a number with a decimal separator comma (i.e. "0,1141");

4. Format the cell by using the Text() function ( =TEXT(A1; "##0,00%") );

5. The number is not formatted properly - "011%"

A Dojo sample for reproduction: https://dojo.telerik.com/AsiLiKil/12


### Expected/desired behavior
"0,1141" should be formatted as "11,41%" as in Excel.

### Environment

* **Kendo UI version: 2021.3.914
* **jQuery version: 1.12.4
* **Browser: [all]

1 comment
ADMIN
Nencho
Posted on: 21 Feb 2022 13:05

Hi,

Currently, our number format strings must use a dot as decimal separator, and comma for thousands separator, regardless of the locale setting. Here's a modified dojo where I corrected only the format string (to use dot instead of comma):

sheet.withCultureDecimals(function(){
    sheet.range('B1').formula('TEXT(A1;"##0.00%")');
});

Note that it must still use semicolons for separating function arguments and that the output is correct as per locale (it uses a comma, not a dot, as decimal separator).

 

Regards,
Nencho
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.