Bug 75951 - Calc - incorrect import of MS XLS formatted IF statements when opening spreadsheet in LibreOffice 4.2.x, regression from 4.1.x
Summary: Calc - incorrect import of MS XLS formatted IF statements when opening spread...
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: Other All
: high critical
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords: possibleRegression, regression
Depends on:
Blocks: mab4.2
  Show dependency treegraph
 
Reported: 2014-03-09 14:26 UTC by mjceallaig
Modified: 2015-12-15 10:55 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample Spreadsheet, screen shots (196.50 KB, application/vnd.ms-excel)
2014-03-09 14:26 UTC, mjceallaig
Details
Screen shot V4.1.5 (201.28 KB, image/jpeg)
2014-03-09 14:28 UTC, mjceallaig
Details
Screenshot V4.2.1 (191.96 KB, image/jpeg)
2014-03-09 14:50 UTC, mjceallaig
Details
This is what Excel 2007 shows (38.40 KB, image/png)
2014-03-10 21:57 UTC, Kohei Yoshida
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mjceallaig 2014-03-09 14:26:19 UTC
Created attachment 95411 [details]
Sample Spreadsheet, screen shots

Problem description: In an xls spreadsheet that I use for processing results in athletics races I copy runners details from one sheet to another using IF statements. When I upgraded from Libreoffice 4.1.5 to 4.2.2 the If statements in 2 columns were modified when I opened the spreadsheet.

In the attached spreadsheet the “Print PS Boys” sheet, cell D6 contains the IF statement below when the file is opened in Libreoffice calc V4.1.5.

=IF($'Primary Boys Res'.B7="","",$'Primary Boys Res'.B7)   

When the same file is opened in Libreoffice Calc V4.2.2 the IF statement now reads

=IF($'Primary Boys Res'.IX7="","",$'Primary Boys Res'.IX7)

The IF statements in Column E are also similarly affected however the If Statements in Columns B, C and F are unaffected.

Also attached are screen shots showing the sample sheet when opened with Calc V4.1.5 and with V4.2.2.

Using V4.2.2 I tried correcting the IF statements by replacing IX with B however when the file was saved and re-opened columns D and E were again showing the modified formula.

The problem occurred on Windows XP, Vista and 7 PCs.



              
Operating System: All
Version: 4.2.1.1 release
Last worked in: 4.1.5.3 release
Comment 1 mjceallaig 2014-03-09 14:28:05 UTC
Created attachment 95413 [details]
Screen shot V4.1.5
Comment 2 mjceallaig 2014-03-09 14:39:59 UTC
In the problem description V4.2.2 should be V4.2.1.
Comment 3 mjceallaig 2014-03-09 14:50:46 UTC
Created attachment 95416 [details]
Screenshot V4.2.1
Comment 4 m_a_riosv 2014-03-09 20:34:29 UTC
Hi mjceallaig, thanks for reporting.

Please don't set up yourself the bug as NEW when reporting. A confirmation from other person is the right way.

Reproducible:
Win7x64Ultimate
Version: 4.2.0.4 Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
Version: 4.2.1.1 Build ID: d7dbbd7842e6a58b0f521599204e827654e1fb8b
Version: 4.3.0.0.alpha0+ Build ID: 335a8a84fe6349fd716d4978346cfff9c884dd9b
   TinderBox: Win-x86@39, Branch:master, Time: 2014-03-07_23:59:04

Last working:
Version: 4.1.6.0.0+ Build ID: 3ce626c81ac4a9b4b70c61d9fa576f6ae2c85c8

I think a similar bug was already reported but I can't find it.

Added to MAB, references changed without notice => data loss.
Comment 5 V Stuart Foote 2014-03-09 22:36:42 UTC
Confirming the mishandling of MS binary .xls "IF" statements and loss of Cell reference, adjusting title and version to the 4.2.0.4 release. But, this appears to be only an issue with the 4.2.x Calc import filters handling XLS formula import.

When exported from 4.1.5.3 build to the ODF .ods format, the cell references and formulas are being handled correctly by builds of 4.2.0.4, 4.2.1, dev builds of 4.2.2 and current builds of LODev master 4.3.

A reasonable work around (from LibreOffice perspective) exists in that correct function is regained with simple change in format to ODF .ODS

Also, when exported back out of .ods to .xls--formulas in the resulting XLS rendering are functional MS Office 2007. Another might test, but suspect the same outcome for MS Excel 2003, 2010 and 2012.
Comment 6 Kohei Yoshida 2014-03-10 21:53:03 UTC
I need some clarification. If you open the document in Excel, all the if statement cells are empty.  Is that what you expect to see?

When it comes to importing Excel document, we should go by what Excel does rather than what the previous version of Calc did.  To me, neither 4.1 nor 4.2 are correct.
Comment 7 Kohei Yoshida 2014-03-10 21:57:42 UTC
Created attachment 95559 [details]
This is what Excel 2007 shows
Comment 8 Kohei Yoshida 2014-03-10 22:00:37 UTC
This smells a lot like one of the earlier file corruption bug I fixed.  If that Excel file you've submitted has been resaved by LibreOffice, then we need the version prior to it.  We need a version that was saved last by Excel.
Comment 9 Kohei Yoshida 2014-03-10 22:21:49 UTC
Actually I didn't mean to remove this from MAB.
Comment 10 mjceallaig 2014-03-11 22:52:21 UTC
Sorry, the original spreadsheet was created in Excel in 2006 and I don't have a previous copy that was saved in Excel. I've been creating a new copy of the spreadsheet every year since then. I was using Open Office Calc for a number of years and changed to Libre Office a couple of years ago so the copies I have would have been saved in either Open Office or Libre Office.
Comment 11 QA Administrators 2014-10-05 23:05:42 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information.

For more information about our NEEDINFO policy please read the wiki located here: 
https://wiki.documentfoundation.org/QA/FDO/NEEDINFO

If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed.


Thank you for helping us make LibreOffice even better for everyone!


Warm Regards,
QA Team
Comment 12 QA Administrators 2014-11-02 16:43:08 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INVALID due to inactivity and a lack of information which is needed in order to accurately reproduce and confirm the problem. We encourage you to retest your bug against the latest release. If the issue is still present in the latest stable release, we need the following information (please ignore any that you've already provided):

a) Provide details of your system including your operating system and the latest version of LibreOffice that you have confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED and we will attempt to reproduce the issue. 
Please do not:
a) respond via email 
b) update the version field in the bug or any of the other details on the top section of FDO
Comment 13 Robinson Tryon (qubit) 2015-12-15 10:55:07 UTC
Migrating Whiteboard tags to Keywords: (possibleRegression)
[NinjaEdit]