Bug 158859

Summary: Allow names for irregular ranges
Product: LibreOffice Reporter: Leandro Martín Drudi <sanipachenko>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED DUPLICATE    
Severity: enhancement CC: gmolleda, stephane.guillou
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: It is currently possible to do it manually with too many steps and a high level of expertise.
Example define name with discontinue ranges

Description Leandro Martín Drudi 2023-12-25 15:55:21 UTC
Description:
Currently, if we select irregular ranges and try to assign them a name in LibreOffice Calc, it throws an error because it's not supported. However, in spreadsheets in general, this action is supported, and by not allowing it in Calc, it reduces interoperability between different programs.

Steps to Reproduce:
1. Open Calc.
2. Select an irregular range.
3. Type a name in the name box.
4. Press ENTER.

Actual Results:
You will receive an error indicating that the action is not allowed.

Expected Results:
* The range receives a name.
* When opening spreadsheets in other formats, they should be recognized and managed (selected, edited, deleted, etc.) in LibreOffice Calc.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
In Excel, you can name discontinuous ranges by separating the different ranges with the argument separator character (in Argentina, the semicolon [;]; in some areas of Mexico and the United States, the comma [,]).
For example:
A1:B5;C8:D10;F1
In the case of Google Sheets, it doesn't support naming irregular ranges but does allow working with Excel files containing irregular ranges.
Comment 1 Leandro Martín Drudi 2024-01-07 03:36:53 UTC
Created attachment 191792 [details]
It is currently possible to do it manually with too many steps and a high level of expertise.

Currently, it is possible to create it from the name manager, but it is complex and involves too many clicks and steps. Automating this will help gain ground since Google Sheets does not yet support something like this; Excel does, which could help make this feature compatible between Cal and Excel.
Comment 2 gmolleda 2024-01-07 12:37:05 UTC
Created attachment 191794 [details]
Example define name with discontinue ranges

Select the ranges A2:A3 and C3:C4 
Write a name for it, the error is: "The selection needs to be rectangular in order to name it."
Use the menu Sheet - Named Ranges and Expressions - Define 
Name: joined
Range or formula expression: $Sheet1.$A$2:$A$3~$Sheet1.$C$3:$C$4
Push button OK.

We expect that by giving a name to a discontinuous range the Calc program will create the name and join the different ranges with the combine sign: ~
Comment 3 Stéphane Guillou (stragu) 2024-01-08 23:37:56 UTC
Thank you for the suggestion. This is already tracked in bug 35296, so I am marking as duplicate.
Please feel free to comment there, especially if you have a sample document to share to demonstrate the need for interoperability.

*** This bug has been marked as a duplicate of bug 35296 ***