Bug 55875 - XLSX import loose data with >15 char. numbers in text type cells
Summary: XLSX import loose data with >15 char. numbers in text type cells
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.0.0.alpha1
Hardware: All All
: medium critical
Assignee: Noel Power
URL:
Whiteboard: target:3.7.0 target:3.6.4
Keywords: regression
: 55091 59470 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-11 14:09 UTC by cyrille grosdemange
Modified: 2013-11-16 16:14 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
cell format dialog in LO-3.6 (116.51 KB, image/png)
2012-10-25 10:30 UTC, Petr Mladek
Details
cell format dialog in LO-3.5 (119.08 KB, image/png)
2012-10-25 10:31 UTC, Petr Mladek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cyrille grosdemange 2012-10-11 14:09:00 UTC
With Excel 2007 (tested with 2007 but maybe 2010 too?), create a new spreadsheet doc.

- select a cell and set number type as Text
- Enter a long number as 1234567890123456789
- save as XLSX (not tested with XLS)
- Open the file with LibreOffice
- The number in the cell is now 1234567890123450000

-> The numbers after the 15th are replaced with 0... the same beavior as typing this number in a standard number cell format, and changing it after this in text cell format ...

example file from Excel 2007 Vista 32bits : http://cyrille.grosdemange.free.fr/libo/test-cellules.xlsx

In this file, the A2 cell shows the bug. The others are for reference.
This file displays well in GoogleDocs : https://docs.google.com/open?id=0ByjMh5M85asZaWhCeHhEbnZFWHM

--

My alternative method to open correctly this file in LibO is :
- import in GoogleDocs (works)
- export from GoogleDocs in ODS
- Open the exported Google Docs ODS with LibO

So ... I think the problem is in the import filter who should set the cell number type BEFORE inserting values into it (Don't know the code but seems like that)

Thanks.

Set this bug to blocker because long numbers are sometime serial numbers etc. and NEEDS to be correct.
Comment 1 Julien Nabet 2012-10-17 22:02:34 UTC
On pc Debian x86-64 with master sources updated today, I reproduced the problem.
I've got "54645768794543200000" which displays on A2 cell with doc from http://cyrille.grosdemange.free.fr/libo/test-cellules.xlsx

Eike: one for you?
Comment 2 Petr Mladek 2012-10-25 10:22:54 UTC
It works with LO-3.5 => regression.
It is a kind of data loss => we should fix it ASAP.

Well, it was already in LO-3.6.0. It was not reported immediately => it affects only some users => it should not block 3.6.3 with many other useful fixes => reducing the severity a bit
Comment 3 Petr Mladek 2012-10-25 10:30:28 UTC
Created attachment 69058 [details]
cell format dialog in LO-3.6

Please, notice the "5.46457687945432E+019" in the preview box and also in the input line. LO-3.5 shows the full number there. I wonder if it is the reason for the shrinking.
Comment 4 Petr Mladek 2012-10-25 10:31:26 UTC
Created attachment 69059 [details]
cell format dialog in LO-3.5

It shows the full 54645768794543243576 number.
Comment 5 Kohei Yoshida 2012-11-06 15:23:48 UTC
"filters and storage" is a very weird component.  Changing that to Spreadsheet.
Comment 6 Noel Power 2012-11-09 13:59:12 UTC
I'll have a look
Comment 7 Noel Power 2012-11-09 14:37:13 UTC
(In reply to comment #0)
> So ... I think the problem is in the import filter who should set the cell
> number type BEFORE inserting values into it (Don't know the code but seems
> like that)

certainly filter related, the order shouldn't matter ( or at least it didn't in 3.5 )
Comment 8 Not Assigned 2012-11-09 17:13:55 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f39238693096fe0001f8d526f22b920fc0be185b

fix for fdo#55875 numbers as text converted strangely



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Markus Mohrhard 2012-11-11 08:00:00 UTC
Marking as fixed.
Comment 10 Not Assigned 2012-11-11 08:01:11 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=08ca08d2f46c6119550024ce02bc42c271a3644b&g=libreoffice-3-6

fix for fdo#55875 numbers as text converted strangely


It will be available in LibreOffice 3.6.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Markus Mohrhard 2012-11-17 11:14:12 UTC
*** Bug 55091 has been marked as a duplicate of this bug. ***
Comment 12 bugs 2013-01-04 09:56:45 UTC
Is there a way to fix this bug manually in version 3.6.0.2 ?
(replace a file or something)

Or does anyone know a work-around?

The problem is, we work on the office with Ubuntu 12.04 LTS
and the LibreOffice version from the Ubuntu Repository...
This version will probably not updated (soon) to 3.6.4
Comment 13 Julien Nabet 2013-01-04 10:19:42 UTC
bugs@eases.nl:
By looking at the fix, I don't think there could be a workaround but perhaps I'm wrong (since I'm not a core dev just a simple contributor) and a core dev could give one.
Just an idea, if you're not authorized to install .deb from LO website, would it be possible to try ppa Libreoffice?
Comment 14 bugs 2013-01-04 12:17:09 UTC
"Just an idea, if you're not authorized to install .deb from LO website, would it be possible to try ppa Libreoffice?"

This is certainly a possible solution. But I can't find a PPA LibreOffice for Ubuntu 12.04 LTS. There are however PPA's for 12.10 and I believe even for 13.04, but the do not work on the LTS...

A .deb install I tried on one of the systems, but the integration with Unity/HUD doesn't seems right. Also the toolbar icons go black. So this is not a solution... (and I do not prefer .deb installs)
Comment 15 Eike Rathke 2013-01-16 16:03:19 UTC
*** Bug 59470 has been marked as a duplicate of this bug. ***
Comment 16 Joel Madero 2013-04-26 03:21:12 UTC
As part of FDO cleanup we are checking version #'s for regressions against minor releases in 3.6.

I was able to confirm this one on 3.6.0.0-alpha1


Updating version