Issue 123306

Summary: cell contents duplicated when opening xlsx
Product: Calc Reporter: ville.jarvensivu
Component: open-importAssignee: AOO issues mailing list <issues>
Status: RESOLVED DUPLICATE QA Contact:
Severity: Normal    
Priority: P3 CC: chip, czeslaw.wolanski, damjan, daniel_j_lema, elish, issues, john.ha24, kschenk, mgilb999, Peter.Binney, wrpower123
Version: 4.0.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: 4.1.13
Developer Difficulty: ---
Attachments:
Description Flags
Cell contents of "CJ1" are duplicated multiple times in OO > 3.4.1
none
to-do list demonstrating duplicated contents in cells
none
Sample file with the same sympthom
none
Very small file that illustrates problem
none
File showing the problem
none
Libre Office can read the file without problem
none
Google Docs can read the file without problem
none
screenshots AOO & LO none

Description ville.jarvensivu 2013-09-20 10:00:11 UTC
Created attachment 81585 [details]
Cell contents of "CJ1" are duplicated multiple times in OO > 3.4.1

Overview: Sometimes cell-contents are corrupted when opening certain .xlsx (contents are duplicated multiple times in same cell)

Actual Results: "CJ1"-cell contents:
"Low dust
-logoLow dust
-logoLow dust
-logo"

Expected Results: "CJ1"-cell contents:
"Low dust
-logo"


OS: Mac OS X 10.6.8 (and 10.8.4) 

Build Date & Hardware: 3.4.1 Build: 9593  ... bug is present in 4.0 (Build: 9702)

Additional Builds and Platforms: Last version that I found contents correct: stable version: 3.3.0 (Build: 9567) OS X 10.6.8 (and latest 10.8.4) 

Steps to reproduce: Open attached .xlsx and check cell "CJ1"

Additional info: might relate to newline's inside cell.
Comment 1 Edwin Sharp 2013-09-20 12:14:22 UTC
Low dust 
vs. 
Low dust
-logoLow dust
-logoLow dust
-logo

Excel 2010 and Calc Rev. 1523756 Win 7
Comment 2 Chip Davis 2014-04-03 08:32:53 UTC
I have a much more extensive example if it would assist the developers working on this problem.
Comment 3 Edwin Sharp 2014-04-03 08:41:59 UTC
(In reply to Chip Davis from comment #2)
> I have a much more extensive example if it would assist the developers
> working on this problem.

Yes please.
Comment 4 Chip Davis 2014-04-03 14:25:03 UTC
Created attachment 83072 [details]
to-do list demonstrating duplicated contents in cells

Hope this helps.  This is quite repeatable.
Comment 5 Daniel Lema 2014-05-20 14:36:07 UTC
Created attachment 83432 [details]
Sample file with the same sympthom
Comment 6 Kay 2014-08-02 22:32:13 UTC
Testing with --

AOO411m4(Build:9774)  -  Rev. 1614049
2014-07-28 17:54 - Linux i686

and confirmed the problem still persists.
Comment 7 Bill Power 2015-01-19 09:24:09 UTC
Created attachment 84439 [details]
Very small file that illustrates problem

If the attached file is opened by Calc (4.1.1) the contents of cells in column A are corrupted. The problem disappears if any row is deleted or the contents of any cell cleared. Adding more rows doesn't fix the problem.
Comment 8 Bill Power 2016-03-11 10:41:57 UTC
The problem persists in 4.1.2

Easily reproducable in the file I attached Jan 19, 2015.
Comment 9 peterB 2018-04-20 18:07:27 UTC
And it is still there in 4.1.5

For instance, when the attached file (Excel_cellTextDuplication.xlsx) is opened the contents of all (I think) the cells is duplicated.

This does not happen using Libre Office or Google docs (I attach .ods files after opening and saving using both these: Excel_cellTextDuplication-LibreOffice.ods and Excel_cellTextDuplication-GoogleDocs.ods).

Makes OOO look more and more creaky I'm afraid!
Comment 10 peterB 2018-04-20 18:08:37 UTC
Created attachment 86390 [details]
File showing the problem
Comment 11 peterB 2018-04-20 18:09:49 UTC
Created attachment 86391 [details]
Libre Office can read the file without problem
Comment 12 peterB 2018-04-20 18:10:33 UTC
Created attachment 86392 [details]
Google Docs can read the file without problem
Comment 13 damjan 2023-01-17 18:46:50 UTC
This text duplication bug only happens on the 4.1.x releases. On the trunk branch, it's fixed, but we don't know by which commit...
Comment 14 John 2023-01-25 22:50:41 UTC
I downloaded file showing the problem.xlsx and it opens in AOO 4.1.13 without duplicating anything - there is no difference between AOO and LO 7.3.7.2.
Comment 15 Czesław Wolański 2023-01-26 07:53:49 UTC
I tested the file "problem.xlsx" on Windows with
AOO (3.3.0; 4.1.1; 4.1.13; 4.2dev) and LO (7.3.7.2).

The result varies - see the attached juxtaposition.
Comment 16 Czesław Wolański 2023-01-26 07:55:37 UTC
Created attachment 87168 [details]
screenshots AOO & LO
Comment 17 damjan 2023-01-28 01:55:39 UTC
I managed to build some old OpenOffice versions on Windows to investigate this bug further. These were the results:

                                                ---> AOO4113-GA
                                               /     BAD
                                              /
                   -----------------------------------> AOO41X
                  /                                     BAD?
                 /
                /
----> merge-base -->-----+----------------------------> trunk
      25 Feb 2014   2ed47956e3e                         GOOD
      BAD           29 Aug 2015
                    GOOD

By backporting 8-9 patches (from https://wiki.openoffice.org/wiki/Building_old_versions), I managed to build the merge-base between AOO41X and trunk (f331e23ffae9e26f93997dc8f02086c5733e80df) from 25 Feb 2014, as well as a nearby commit, 2ed47956e3ec22116d5164494008afeac3f699a1 from 29 Aug 2015.

The merge-base also shows the text duplication, but it's fixed by 2ed47956e3e, 550 days later. 514 commits happened in that time frame. Nothing jumps out at me, looking through the list of commits, nor through Bugzilla bugs closed in that time frame. "git bisect" would need 10 more steps, possibly more as the alg_writeframes branch was merged during that time. I'll see what I can do to narrow it down further.
Comment 18 damjan 2023-01-30 23:09:09 UTC
                                                ---> AOO4113-GA
                                               /     BAD
                                              /
                   -----------------------------------> AOO41X
                  /                                     BAD?
                 /
                /
----> merge-base -->------+----------+-----------+---------> trunk
      25 Feb 2014     1b68054a318a 6dd50e53129ad 2ed47956e3e GOOD
      BAD             19 May 2014  21 Oct 2014   29 Aug 2015
                      BAD          GOOD          GOOD

It was fixed between 1b68054a318a and 6dd50e53129ad.
Comment 19 damjan 2023-01-31 00:03:18 UTC
I finally found it.

This issue was fixed on trunk on 26 May 2014 by commit c0670b14b16dba0137a280c9aabcadc554988f08, which makes it a duplicate of bug 124928.

However that fix was never applied to the AOO41X branch so all 4.1.X releases were broken.

I've now cherry-picked it into AOO41X in commit 768bfd82c2396d947d0a3b8ab5aa44cfe31f4111, and it should appear in the upcoming 4.1.14 release.

Resolving duplicate.

Thank you for your bug report and sample documents.

*** This issue has been marked as a duplicate of issue 124928 ***