Skip to content

NumberToTextConverter ignores locale #1626

@Bykiev

Description

@Bykiev

NPOI Version

latest

File Type

  • XLSX
  • XLS
  • DOCX
  • XLSM
  • OTHER

Steps to reproduce

Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("ru-RU");
var res = NumberToTextConverter.ToText(1234.56);

Issue Description

NumberToTextConverter ignores locale and FormatGreaterThanOne, FormatLessThanOne always using dot as decimal separator, that's why DataFormatter fails in cultures with comma separator. To resolve the issue the new ToText(double value, CultureInfo locale) overload should be added.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions