Bug 101124 - MERGE and centre cells loses formula
Summary: MERGE and centre cells loses formula
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Formula Calc-Merge-Split
  Show dependency treegraph
 
Reported: 2016-07-26 07:19 UTC by Elmar
Modified: 2018-05-30 06:08 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
merge cells loses formula (14.33 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-07-26 07:23 UTC, Elmar
Details
ms excel example after the merge cells (20.50 KB, application/vnd.ms-excel)
2016-07-26 07:24 UTC, Elmar
Details
Proposal for resolving the issue (18.45 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-08-02 04:46 UTC, Elmar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elmar 2016-07-26 07:19:42 UTC
User-Agent:       Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Build Identifier: LibreOffice 5.2.1.0.0

If I create a formula in a cell, and I then want it to act in a merged group of cells, the formula is converted to text.
Say I want this to be part of a heading across multiple columns.

Reproducible: Always

Steps to Reproduce:
1. create formula in a cell
2. select 2 or more cells
3. select "Merge Cells"
4. the formula is converted to text
Actual Results:  
formula converted to text
Has been doing this in previous beta versions
does the same in LO 4.4.3.2 so is not a new issue.
work around is to merge cells first, then to paste formula into merged cells, however, this is counter-intuitive, especially for persons who have to use MS Excel a lot

Expected Results:  
Should keep the formula, or there should be an option to do so.
not apply relative addressing changes, since this is a move (cut&paste), not copy, if it has to move the formula to the first cell.

[Information automatically included from LibreOffice]
Locale: en-US
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: yes


Reset User Profile?No
Comment 1 Elmar 2016-07-26 07:23:08 UTC
Created attachment 126407 [details]
merge cells loses formula

cells c4 and c5 contained the same formula before the merge.
cells c4-e4 is the result after the merge
Comment 2 Elmar 2016-07-26 07:24:10 UTC
Created attachment 126408 [details]
ms excel example after the merge cells

provided for comparative purposes
Comment 3 Buovjaga 2016-08-01 19:24:10 UTC
(In reply to Elmar from comment #1)
> Created attachment 126407 [details]
> merge cells loses formula
> 
> cells c4 and c5 contained the same formula before the merge.
> cells c4-e4 is the result after the merge

Could repro in 5.1.4, if I answered "Yes" to the question of whether to move content of empty cells.
In 5.3 it did not ask and there was no problem.
With your document, I merged and centered C5-E5.

Elmar: could you test with 5.2?

64-bit, KDE Plasma 5
Build ID: 5.1.4.2 Arch Linux build-1
CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha0+
Build ID: c1b665fcdacd4141137f1e369527e2c0d94513ae
CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on July 26th 2016
Comment 4 Elmar 2016-08-02 04:44:36 UTC
Buovjaga: yes, I go the same results. So this is an education issue.

Problem: MS is the dominant player and thus many will have used Excel first before coming to Calc. Excel 2013 offers a number of options in the merge, but all of them convert the contents to text.

What to do?

The text in Calc says: "Should the contents of the hidden cells be moved to the first cell?"

Here are some options:
"Should the contents of the hidden cells be moved to the first cell and converted to text?"
or 
"Should the contents of the hidden cells be moved to the first cell?
Yes: convert to text
No: selected cell determines what to display in merged view"

You say 5.3 adopts the MS approach. I think there is a case to be made to keep the up-to-Calc 5.2 approach.

The reason: have a look at the new example. If I have a formula which includes too much text to display in a cell I can simply merge cells which I don't need to display. This is a far more elegant solution that what is offered by Excel 2013 (which I have shown in the shaded text box.)

In Excel, the contents of the merged merged cells is lost.
Comment 5 Elmar 2016-08-02 04:46:32 UTC
Created attachment 126515 [details]
Proposal for resolving the issue
Comment 6 Elmar 2016-08-02 04:51:24 UTC
Afterthought:
Interestingly, Excel 2013 quite happily accepts my Calc xls save - when I unmerge the cells, the first option  (No) returns it the way it was before I merged.

Of course, in the case of the Yes option, the 2nd and 3rd cells are empty as expected.
Comment 7 Elmar 2018-05-30 05:36:12 UTC
I think this has been resolved in v6.1