Bug 62129 - FILEOPEN: Column references in formulas break on import with MS Excel 2003 XML filter
Summary: FILEOPEN: Column references in formulas break on import with MS Excel 2003 XM...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: MSO-XML2003 80381
  Show dependency treegraph
 
Reported: 2013-03-10 22:02 UTC by Peter Jentsch
Modified: 2017-12-19 03:53 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example document showing the error. Produced with Excel for Mac as Excel 2004 XML file (3.03 KB, text/xml)
2013-03-10 22:02 UTC, Peter Jentsch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Jentsch 2013-03-10 22:02:52 UTC
Created attachment 76297 [details]
Example document showing the error. Produced with Excel for Mac as Excel 2004 XML file

When importing a SpreadsheetML / Excel 2003/2004 XML file containing merged cells with formulas, relative column references in those formulas are calculated incorrectly. 

Sample file attached. The error is also present in AOO 3.4.1.
Comment 1 Joel Madero 2013-04-17 18:27:27 UTC
So I can confirm two different behaviors but both wrong (between 3.6.5.2 & 4.1 master build pulled a few days ago).

Because of this I'm going to leave at version 4.0.1.2 as it's worse than it was in 3.6.5.2 (IMO) but both are wrong.


I have been able to confirm the issue on:
Version: 4.1.0.0.alpha0+Build ID: 6e3e6ef7257e93743a72719581ef6fe0016e58e
Date:   Thu Apr 11 15:24:38 2013 +0200 
Platform: Bodhi Linux 2.2 x64

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
As I've been able to confirm this problem I am marking as:

New (confirmed)
Major - data loss, xml filter is definitely broken.
High - default, seems appropriate.

Keywords - regression - I am putting regression only because it has gotten worse, it seems like some work was done in the area of the filter and it broke it more. Plus a bibisect might get us closer to useful code pointers

Whiteboard Status - bibisectrequest

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link:
https://wiki.documentfoundation.org/QA/BugTriage and join us on freenode at #libreoffice-qa

There are also other ways to get involved including with marketing, UX, documentation, and of course developing -  http://www.libreoffice.org/get-help/mailing-lists/. 

Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
Comment 2 Joel Madero 2013-05-02 18:33:24 UTC
So after attempting to bibisect - this is not a regression, it's just broken. Updating version to 3.6alpha (verified with bibisect).

Removing bibisectrequest as it's useless in this case
Comment 3 Joel Madero 2013-05-02 18:47:39 UTC
dangit - so another attempt and it seems like it was broken, then fixed, then broken again - apologies for spamming comments


Bibisect below

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

f6275e54c182c5a8ed2368418445d84beb165d58 is the first bad commit
commit f6275e54c182c5a8ed2368418445d84beb165d58
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Mon Dec 10 11:35:50 2012 +0000

    source-hash-d9412fb4755377b8358a46a249cfe29a22ea9451
    
    commit d9412fb4755377b8358a46a249cfe29a22ea9451
    Author:     David Tardon <dtardon@redhat.com>
    AuthorDate: Tue Sep 11 07:31:43 2012 +0200
    Commit:     David Tardon <dtardon@redhat.com>
    CommitDate: Tue Sep 11 07:36:32 2012 +0200
    
        fdo#53520 rename portuguese dicts
    
        Change-Id: I70cb4856f1db4722e886407d1c2fdf6a73b9a7f3

:100644 100644 0953f1686760ca6fac561e87d200e640875764f2 44293ef104571a1eaf6bfecd43d4a01702bdf52c M	ccache.log
:100644 100644 d86efaac0c94c20bff57e3036b4417574d73ce4a 86a37681bb8cfd44d04534e14b93dfd45cf0fe63 M	commitmsg
:100644 100644 5728ca3baa483958445168e9b9fccb6f075c5897 ba1824fe7a9f7615a41309f3f318d62e2c4a7589 M	dev-install.log
:100644 100644 8acfb864b3fb560156573153b434b749e43dcf60 5ee43aee8b36e6868002119bee285d15f5000fe0 M	make.log
:040000 040000 580424baebbc6a88398ef8d8478f1b4c5d6c6219 a363beeec352e9ce16ad9cc261f62b98edc79d12 M	opt


# bad: [5b4b36d87517a6ea96ff8c84c46b12f462fc9a1a] source-hash-8450a99c744e9005f19173e4df35d65640bcf5c4
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# skip: [16b0b88cbd4ef0f51816e97277e40c5cf78f7bf9] source-hash-099198a4224778fe6e43f5dc13b5b9b1b4dc828c
git bisect skip 16b0b88cbd4ef0f51816e97277e40c5cf78f7bf9
# skip: [1b33e76db9e293bea69b7f814ee90a52a10f7a57] source-hash-cac1f33e839469d884730350e46a21d92fb442f2
git bisect skip 1b33e76db9e293bea69b7f814ee90a52a10f7a57
# good: [bc003d6498b1bb1188ed2387d87f6723d5a329c7] source-hash-c8218367a0f52206591a5048848fa5292405b6c3
git bisect good bc003d6498b1bb1188ed2387d87f6723d5a329c7
# bad: [62b2ae5ee4cc77ad0b399c5a716ef526023d13ab] source-hash-e9960f36675a025c0536dec30ae56c50f4adecb1
git bisect bad 62b2ae5ee4cc77ad0b399c5a716ef526023d13ab
# bad: [aefa1263d1642e8d9677d385f492530ae0725fc6] source-hash-e63bba0013e5ce34cd04559632206bb7c891eebe
git bisect bad aefa1263d1642e8d9677d385f492530ae0725fc6
# good: [da69f6b7ef762284f67b1562f7aec6e37206e65b] source-hash-8638f1e72a3fe830c0e8dcc1bd847d4fb9e599ee
git bisect good da69f6b7ef762284f67b1562f7aec6e37206e65b
# good: [358ad9e115542633c030659959937b107661624f] source-hash-b679a2a02180c017bd8b596fb2e4f283bad93b75
git bisect good 358ad9e115542633c030659959937b107661624f
# bad: [f6275e54c182c5a8ed2368418445d84beb165d58] source-hash-d9412fb4755377b8358a46a249cfe29a22ea9451
git bisect bad f6275e54c182c5a8ed2368418445d84beb165d58
# good: [99fb4d5c4493406d720bb58eedd6c79b2c304c77] source-hash-982b7cb498c3ea1106c5d2184f84989d99b1d942
git bisect good 99fb4d5c4493406d720bb58eedd6c79b2c304c77
# good: [fe309e4a83889bed615770908d76f717e3797e05] source-hash-337ef5808dd8e55c06d00b222e69c5ba287acab5
git bisect good fe309e4a83889bed615770908d76f717e3797e05
Comment 4 Matthew Francis 2015-01-22 11:48:46 UTC
From commit 3420be984986bcff03d6d127b913fc07372fe89f there is a sequence of commits where attachment 76297 [details] either loads blank or fails to load; from commit a2a10b59876951b6493419713e9054ceabd3d6cc onwards the file loads again but there are rows/cells missing.

There is a separate problem with the file which has always existed (inherited from OOo) that the cell references in the merged cells are wrong. For instance, B1:C1 loads as "=B1+1", but should be "=A1+1" according to what Excel shows. Another bug should really be raised for this, but as it can't be reproduced in any version released since 2012, a proper report may have to wait for this bug to be fixed.

Adding Cc: to pjotr@guineapics.de


commit 3420be984986bcff03d6d127b913fc07372fe89f
Author: Peter Jentsch <pjotr@guineapics.de>
Date:   Tue May 1 00:24:01 2012 +0200

    fixed problem with template recursion in spreadsheetml import.
    
    Changed recursion to iteration in various places (creating column styles and both row styles and rows)
    Recursion when creating cells/columns remains.
    
    Change-Id: Ie5d27c576069b79225e7901671227c0ff8dce75d

...

commit a2a10b59876951b6493419713e9054ceabd3d6cc
Author: Peter Jentsch <pjotr@guineapics.de>
Date:   Tue May 1 00:09:39 2012 +0200

    optimize font-decl template for libxslt (using exslt functions)
    
    Change-Id: I5b8469db0729fdb722d22ae9a0a8688658db39f0
Comment 5 Peter Jentsch 2015-01-24 15:40:44 UTC
I try to fix this issue in the upcoming weeks. I have a trial version Microsoft Office to verify the fix. Test documents with a corresponding XLS version (to verify the import result) are very welcome.
Comment 6 Robinson Tryon (qubit) 2015-12-13 11:09:37 UTC Comment hidden (obsolete)
Comment 7 Xisco Faulí 2017-09-11 08:37:21 UTC
Dear developer,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assigned it back to yourself if you're still working on this.
Comment 8 Kohei Yoshida 2017-12-19 03:53:04 UTC
The current master branch now uses a brand-new import filter for Excel 2003 XML from the orcus library.  With that, this issue is no longer present.