Bug 96429 - Importing the Intersection (or Union) Operator from Excel with Excel A1 (or R1C1) Formula Syntax
Summary: Importing the Intersection (or Union) Operator from Excel with Excel A1 (or R...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.0.3.2 release
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-12 00:27 UTC by Bob Briscoe
Modified: 2017-01-08 11:45 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
example of bug 96429: intersection operator on 'intersection' sheet, and union and intersection operators on 'union_and_intersection' sheet (13.50 KB, application/vnd.ms-excel)
2015-12-21 23:28 UTC, Bob Briscoe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Briscoe 2015-12-12 00:27:39 UTC
A version of this bug-report with screen-shots is here: <http://homefarmparham.co.uk/tmp/calc/IntersectCalcImportBug.html>

In Calc, if you had selected Calc A1 Formula Syntax (the default), then you import a formula from MS Excel, an intersection operator that was <SPACE> in Excel A1 formula syntax correctly converts to the '!' operator. For example, if the formula in MS Excel on Windows was originally:
    =A2:C2 B1:B3+3
then after import, the Calc A1 formula syntax will (correctly) be:
    =A2:C2!B1:B3+3
For instance, if the number 7 is in cell B2, the output of the above formula will be 10.

In Calc, if instead you had selected Excel A1 Formula Syntax (using Tools>Options>Calc>Formula), then you import a sheet from MS Excel, an intersection operator that was <SPACE> in Excel should appear unchanged as a <SPACE>. However, it incorrectly displays as the '!' operator as if it has converted to Calc Formula Syntax. For example, if the formula in MS Excel on Windows was originally:
    =A2:C2 B1:B3+3
then after import, the Excel A1 formula syntax will (incorrectly) show as:
    =A2:C2!B1:B3+3 

When Calc is set to Excel A1 Formula Syntax, a '!' in this position should lead to an error, but instead it shows the result 10, which is therefore a bug. 

If you cut the formula and re-paste it into the same cell, it gives a #NAME? error, which is what you would expect. But it didn't give a #NAME? error before.

This appears to only be a problem of how the underlying formula is displayed, not how it calculates (which is why I've categorised the severity as minor). 

I suspect what is happening here is that the Excel file format is converted to Calc A1 formula syntax as an internal representation, but then Calc is failing to display the underlying Calc syntax in the selected syntax (Excel A1). 


Everything said above about Calc's Excel A1 Formula Syntax applies equally to Calc's Excel R1C1 Formula Syntax.

Everything said above about the intersection operator applies equally to the union operator (',' in Excel and '~' in Calc). For instance, after import, the Excel formula
    =SUM((A1:A3,B1:B3) A2:D2)
displays in Calc as:
    =SUM((A1:A3~B1:B3)!A2:D2)
irrespective of the selected formula synax.

However, I can't think of a use for the union operator.
Whereas, all my business's cash books use the intersection operator extensively.

This may be related to bug 96426, but I've reported the two separately.
Comment 1 Buovjaga 2015-12-16 09:41:43 UTC
Please attach an example file coming from Excel.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the file.
Comment 2 Bob Briscoe 2015-12-21 23:28:35 UTC
Created attachment 121485 [details]
example of bug 96429: intersection operator on 'intersection' sheet, and union and intersection operators on 'union_and_intersection' sheet

To experience the bug, before opening the attachment, configure Calc using Tools>Options>Formula>Excel A1 Syntax.

The attached file was saved from MS Excel 2002 (10.2614.2625) on Win XP SP2.
Comment 3 Buovjaga 2015-12-22 12:51:25 UTC
Confirmed.

Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+
Build ID: 014633f83e44ae8ba33087b6f38e8e253e281969
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-12-15_06:21:44
Locale: fi-FI (fi_FI)
Comment 4 QA Administrators 2017-01-03 19:55:33 UTC Comment hidden (obsolete)
Comment 5 Bob Briscoe 2017-01-08 11:45:56 UTC
WFM now (as person who originally reported the bug)

LibreOffice
Version: 5.2.3.2
Build ID: 1:5.2.3~rc2-0ubuntu1~trusty1
CPU Threads: 4; OS Version: Linux 4.4; UI Render: default; 
Locale: en-GB (en_GB.UTF-8); Calc: group