After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 723600 - Conflict between array formulas and merged ranges
Conflict between array formulas and merged ranges
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Main System
git master
Other All
: Normal major
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2014-02-04 10:32 UTC by artemus_86
Modified: 2014-02-08 22:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Problematic Gnumeric spreadsheet file, fails to load (148.63 KB, application/x-gnumeric)
2014-02-04 10:32 UTC, artemus_86
Details

Description artemus_86 2014-02-04 10:32:25 UTC
Created attachment 268048 [details]
Problematic Gnumeric spreadsheet file, fails to load

A spreadsheet file that had some calculations, merged cells and other basic formatting  was created in Gnumeric-1.12.1. Then the file was saved with .gnumeric file extension. The file compression level was set to "0" in the program preferences in order to make the .gnumeric file easily readable.

Afterwards, upon an attempt at re-opening this file, Gnumeric just showed an error message "Would split array G32:L35" and refused to load the spreadsheet file. I have found no way to open this spreadsheet document again.

I have attached the problematic spreadsheet file. 

As a sidenote,
if the uncompressed .gnumeric file is opened in a text editor and the following block is deleted/commented out, Gnumeric will accept and load the document again but it will lose all information related to cell merging.

<gnm:MergedRegions>
        <gnm:Merge>G35:L35</gnm:Merge>
        <gnm:Merge>G34:L34</gnm:Merge>
         ....
         ....
         ....
</gnm:MergedRegions>
Comment 1 Andreas J. Guelzow 2014-02-04 19:04:55 UTC
Please note that you can open the file by just deleting:

        <gnm:Merge>G35:L35</gnm:Merge>
        <gnm:Merge>G34:L34</gnm:Merge>
        <gnm:Merge>G33:L33</gnm:Merge>
        <gnm:Merge>G32:L32</gnm:Merge>

These collide with 

        <gnm:Cell Row="31" Col="6" Rows="4" Cols="6">=E24:G27-AF24:AH27</gnm:Cell>

It is not clear to me how you it happen that you have merged cells colliding with an array formula.
Comment 2 Andreas J. Guelzow 2014-02-04 20:38:18 UTC
Here is a way to create a small sample file causing the same issue:

Select A1:B1 and merge
Select A1:C1
enter =pi() using ctrl-shift-enter

save

reopen:
Would split array A1:C1


Interesting that nobody ever run into this before.
Comment 3 Morten Welinder 2014-02-06 15:43:01 UTC
Confirming the recipe from comment 2.

I note that if the two steps are swapped, the merge is not allowed.  I am
guessing we need to disallow the entry of the array formula in the recipe
because it covers a merged range.
Comment 4 Morten Welinder 2014-02-07 19:02:14 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.

Fixed in the sense that entry of arrays on top of merges is now prohibited
in the same way as merging part an array already was.

If you have any trouble reviving your files as outlined in comment 1, please
let us know.
Comment 5 artemus_86 2014-02-07 19:26:56 UTC
I'm very glad that my bug report was useful. 

As for the spreadsheet file, I managed to revive it by just commenting out the "MergedRegions" portion of the file with text editor and saving it into a new file.
Comment 6 Andreas J. Guelzow 2014-02-08 22:31:53 UTC
I am not sure whether the error message presented when the user is trying to enter an array expression makes sense:
Invalid Set Text: 'cannot operate on merged cells'