Bug ID: 131564
           Summary: Cannot set cell number format to percentage + 1
                    decimal from VBA macro (locale-dependent)
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
            Blocks: 108908

Created attachment 158977
Example file from Excel

Attached file contains a simple macro to set cell number format to percentage
with 1 decimal place.
This call does not work in Calc with hu-HU locale, but works with en-US locale.

Columns("B").NumberFormat = "0.0%"

Steps to reproduce:
1.      Open attached xlsm file
2.      Run the macro in Excel and Calc

Actual results:
Values in column B: 1 and 12,5 become in Excel 100,0% and 1250,0% and 10.0% and
125.0% in Calc

However this works correctly with en-US locale since the decimal separator is
dot there, but comma in hu-HU.

Expected results:
Macro works regardless of locale.

LibreOffice details:
Version: (x64)
Build ID: bc898e2c2784e36ad4d4cdf6d962e39069d2c82d
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL

Referenced Bugs:
[Bug 108908] [META] Visual Basic for Applications (VBA) macro issues
You are receiving this mail because:
You are the assignee for the bug.
Libreoffice-bugs mailing list

Reply via email to