Bug 67221 - [FILESAVE] Saving xls file which has cell with formula result #DIV/0! deleted formula, data loss
Summary: [FILESAVE] Saving xls file which has cell with formula result #DIV/0! deleted...
Status: RESOLVED DUPLICATE of bug 67571
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Hardware: Other All
: high critical
Assignee: Not Assigned
Keywords: bibisected, regression
Depends on:
Blocks: mab4.1
  Show dependency treegraph
Reported: 2013-07-23 15:39 UTC by Mikeyy - L10n HR
Modified: 2015-12-15 11:03 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

Test file (6.00 KB, application/vnd.ms-excel)
2013-07-23 15:39 UTC, Mikeyy - L10n HR
the same file saved as xlsx (4.46 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2013-08-01 01:37 UTC, Kevin Suo

Note You need to log in before you can comment on or make changes to this bug.
Description Mikeyy - L10n HR 2013-07-23 15:39:11 UTC
Created attachment 82865 [details]
Test file

This is 100% reproducable from start, but to shorten explanation use attached file.

1. Open file and position your self on cell D3 which is first cell with formula.
2. Copy that cell formula to other cells by draging bottom right corner (or copy/paste) to cells D4:D11.
3. Notice rows 6 and 8 which divide 0 by 0 (0/0 = error = #DIV/0!). Those cells still have formula in them, but result is error since you can't divide 0 by 0.
4. Now save document as xls file and close LO.
5. Open document again and instead of #DIV/0! error you will now see Error: 512 and formula will be deleted, only = sign will be there...

This is regression.

Tested for ODS files also, no problems. Didn't test for xlsx.
Comment 1 Cor Nouws 2013-07-23 19:39:32 UTC
Confirm this on Linux
Thanks for the report Mikeyy
Comment 2 Cor Nouws 2013-07-23 19:44:43 UTC
Was OK in 4.1.0 beta1, wrong in 4.1.0 beta2
Comment 3 Kevin Suo 2013-08-01 01:34:51 UTC
I can confirm this bug in libreoffice, ubuntu 13.04 x86-64.

Please note that behaviour only appears in xls file, does not appear in xlsx and odt files.
Comment 4 Kevin Suo 2013-08-01 01:37:18 UTC
Created attachment 83408 [details]
the same file saved as xlsx

formulas the xlsx file are ok when save.
Comment 5 Mikeyy - L10n HR 2013-08-02 09:34:15 UTC
It seams same problem is present with #VALUE! errors also.
If you save file which has #VALUE! error in a cell and reopen it, it will delete formula.

Probably with some other errors also, but I'm reporting them as I run into it.

Fix should fix root cause of this, not individual errors.
Comment 6 Joel Madero 2013-08-02 20:35:39 UTC
c4147f0bcaf7ff164c48459e07649f690107df1f is the first bad commit
commit c4147f0bcaf7ff164c48459e07649f690107df1f
Author: Jean-Baptiste Lallement <jean-baptiste.lallement@canonical.com>
Date:   Sun Jun 2 08:30:55 2013 +0000

    commit 6fe1ff54c667a4f669feee6954dd9b859fd442b2
    Author:     Jan Holesovsky <kendy@suse.cz>
    AuthorDate: Thu May 30 18:25:09 2013 +0200
    Commit:     Jan Holesovsky <kendy@suse.cz>
    CommitDate: Sun Jun 2 04:54:54 2013 +0200
        sidebar: Allow creation of toolboxes using Widget layout / .ui.
        Change-Id: Idc07614005a00401a51007b1a0aef00e17507daa

:100644 100644 f0788d05067fed5f55fe32beefa51884378a31fb 6cc31d36a1f245861db56a4e67958ef5f0eee4eb M	ccache.log
:100644 100644 631a28239dbfb755bacc5d2eac9e5275edd9abc5 55b13404dd2975d477553904501f5202462fd8e3 M	commitmsg
:100644 100644 3669b7c91512d1289f16b6ffd711d3191f2abb52 e67466bfa90d25200d133125eefa9ff7d2cc0271 M	dev-install.log
:100644 100644 3684b21e345d01258a4ea89a54bb1182d43f6184 d6358af58cc17d9f89479d86c5ee87ac83d6115f M	make.log
:040000 040000 74b258e354d81f3d53724f8e8087f3c1f1ad35a9 964452a3c0358edc0a00cdee1e7aa42ebc2f3b29 M	opt

# bad: [4118d739dbd71e16057ea926ef3ef696025d3b67] source-hash-5bd6a5110bb812f82a81e73422a7b14851f84441
# good: [3e7462bd65e692bf0592d5b080b7716341b62a47] source-hash-1eddfce9894fd05315173744f495619189093dc7
git bisect start 'latest' 'oldest'
# good: [086c82fbd0a50dbf5dd28e8bcc7a6d702cea124e] source-hash-c74f2edfce221960fe546e88f2b3222d69d53598
git bisect good 086c82fbd0a50dbf5dd28e8bcc7a6d702cea124e
# good: [9c55481e7358a36177d62899fa1326b76e07332f] source-hash-4c3ad94c70f98f5062bf96a6f1339992b7ec2bd1
git bisect good 9c55481e7358a36177d62899fa1326b76e07332f
# bad: [9342a3ee4ef4df633567057ea46530d79254b6d2] source-hash-0d61e5dcdbe2cec9df33ac22e3f0e4fbd6a07517
git bisect bad 9342a3ee4ef4df633567057ea46530d79254b6d2
# bad: [c4147f0bcaf7ff164c48459e07649f690107df1f] source-hash-6fe1ff54c667a4f669feee6954dd9b859fd442b2
git bisect bad c4147f0bcaf7ff164c48459e07649f690107df1f
# good: [e34b64067967b5529396d0f9e14d3d59e34e30f1] source-hash-c5b604b9527d0dc32066e17dc3ce7f7370a78fe1
git bisect good e34b64067967b5529396d0f9e14d3d59e34e30f1
# good: [51f094cf62f3f4b4f68f9c77f052d896a97e04e6] source-hash-0143805a565418d2a114c16b7eeba3b784176d9e
git bisect good 51f094cf62f3f4b4f68f9c77f052d896a97e04e6
# good: [790409f95b1bc4fc76e1e78c1395ed692a184ca8] source-hash-5dc41015ed10d4b4bd0eaa59e8cd6c0b1b96cc04
git bisect good 790409f95b1bc4fc76e1e78c1395ed692a184ca8
# good: [d60156ddfbb4f1c7fdf353b34d600605df29f58c] source-hash-c70e55c5d8ecfd5bb690886d7e39a42f66b3702a
git bisect good d60156ddfbb4f1c7fdf353b34d600605df29f58c
Comment 7 Thomas van der Meulen 2013-08-19 17:49:47 UTC
set as a duplicate as users asked for.

*** This bug has been marked as a duplicate of bug 67571 ***
Comment 8 Robinson Tryon (qubit) 2015-12-15 11:03:42 UTC
Migrating Whiteboard tags to Keywords: (bibisected)