Bug 101738 - Number mask in .xlsx format
Summary: Number mask in .xlsx format
Status: RESOLVED DUPLICATE of bug 96356
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.0.5.2 release
Hardware: All All
: medium trivial
Assignee: Bartosz
URL:
Whiteboard:
Keywords: bibisectRequest, regression
Depends on:
Blocks:
 
Reported: 2016-08-26 13:14 UTC by glautercarreira
Modified: 2016-09-23 09:28 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
File showing the issue (created with LO 5.1.5) (4.30 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2016-09-17 21:55 UTC, Johnny_M
Details
Screenshot showing the issue (LO 5.1.5 on Linux Mint 17.1) (73.97 KB, image/png)
2016-09-17 21:56 UTC, Johnny_M
Details
File showing the issue (created with MS Excel 2010) (8.68 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2016-09-21 23:04 UTC, Bartosz
Details
Comparison of example Format Numbers between Office 2010 and LibreOffice 5.1.4 (401.10 KB, image/png)
2016-09-23 02:21 UTC, Bartosz
Details
xlsx file created with MS Excel 2010 used for comparison (9.28 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2016-09-23 02:22 UTC, Bartosz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description glautercarreira 2016-08-26 13:14:06 UTC
I need to create a mask using dot and dash. When you enter 1234567, calc should return: 123.456-7

It works perfectly in .xls format, but displays error in .xlsx format.

The mask has this format: 000"."000"-"0

When you open the .xlsx file containing the above format, the numbers are as follows: 1234567,000-0

After some testing, I found that the problem is caused by point. Any other character used as a separator does not issue.
Comment 1 Johnny_M 2016-09-17 21:55:17 UTC
Created attachment 127390 [details]
File showing the issue (created with LO 5.1.5)

Confirmed with:
- 64-bit Linux Mint 17.1:
Version: 5.1.5.2
Build ID: 1:5.1.5~rc2-0ubuntu1~trusty1
CPU Threads: 2; OS Version: Linux 3.13; UI Render: default; 
Locale: de-DE (en_GB.UTF-8); Calc: group

- 32-bit Windows Vista:
Version: 5.2.1.2
Build-ID: 31dd62db80d4e60af04904455ec9c9219178d620
CPU-Threads: 2; BS-Version: Windows 6.0; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group

The test was done as follows:
1. In a new file, configure the cell number format as 000"."000"-"0 for the cell A1
2. Enter 1234567 into the cell A1
3. Save the file to .xlsx
4. Close the file
5. Re-open the file

Expected results:
2. Cell A1 shows 123.456-7
5. Cell A1 shows 123.456-7

Actual results:
5. Cell A1 shows 1234567,000-0
Comment 2 Johnny_M 2016-09-17 21:56:54 UTC
Created attachment 127391 [details]
Screenshot showing the issue (LO 5.1.5 on Linux Mint 17.1)
Comment 3 Johnny_M 2016-09-17 22:00:26 UTC
Using LO portable releases on 32-bit Windows Vista, the earliest release showing the issue is LO 5.0.5. Last good one is LO 4.0.4.
Comment 4 Johnny_M 2016-09-18 09:52:03 UTC
Additional details:
a. The issue does not occur if the file is opened in MS Excel 2003 (automatically converted to .xls) on the test step 5 in comment 1. Checking the cell formatting, it's shown as "User-defined", but 000\.000-0 (instead of 000"."000"-"0) after the test step 5.

b. In LO, the entered number format will after the test step 2 appear as "Number" category (instead of "User-defined") with "Format" -000.123-4, but "Format code" showing 000"."000"-"0 correctly. After step 5, the latter shows 000,000-0 instead.

c. If the entire test is done in MS Office Excel 2003, the entered number format will after the test step 2 correctly appear as "User-defined" category, showing the format as it was entered: 000"."000"-"0 . And it stays that way on test step 5. (Using the .xls file format!)

Notes:
- The de-DE format locale was tested, which uses a comma for decimal and a point as thousand separator, which is reflected in the "Format" suggestions of the "Number" cell formatting category.

- Although LO 4.0.4 detects the same formatting category as the current version (as "Number" category with "Format" -000.123-4, instead of the "User-defined" category), it shows the "Format code" as 000\.000-0 after the test step 5 like MS Excel 2003, thereby displaying the number correctly in the cell.
Comment 5 Xisco Faulí 2016-09-19 22:03:26 UTC
I can't reproduce the mentioned behavior in

Version: 5.3.0.0.alpha0+
Build ID: 416eb656da5ecf82e4386bbffc7c843f6d065b3f
CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

Could you please try it with a recent daily build to see whether this issue is already fixed in master? http://dev-builds.libreoffice.org/daily/master/
Comment 6 Bartosz 2016-09-21 23:04:26 UTC
Created attachment 127537 [details]
File showing the issue (created with MS Excel 2010)
Comment 7 Bartosz 2016-09-23 02:21:22 UTC
Created attachment 127563 [details]
Comparison of example Format Numbers between Office 2010 and LibreOffice 5.1.4
Comment 8 Bartosz 2016-09-23 02:22:54 UTC
Created attachment 127564 [details]
xlsx file created with MS Excel 2010 used for comparison
Comment 9 Bartosz 2016-09-23 09:28:48 UTC

*** This bug has been marked as a duplicate of bug 96356 ***