Bug 157317 - FILESAVE, FILEOPEN: Formulas don't show database or column labels after save/reload
Summary: FILESAVE, FILEOPEN: Formulas don't show database or column labels after save/...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.5.6.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-18 21:32 UTC by Richard Kelly
Modified: 2023-09-19 21:56 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
ODS file demonstrating the problem (10.63 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-09-18 21:35 UTC, Richard Kelly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Kelly 2023-09-18 21:32:21 UTC
Description:
In Calc, I used "Data / Define Range" to create two databases (Jack and Diane) which have column labels (yes, no, and maybe) in their first rows.  In another cell, I wrote a formula ( =Jack[yes]+Diane[yes] ) which references the DBs and their columns by name.  Note that I typed the formula all in lower case, accepted Calc's suggested completions, and got the mixed case formula you see in parentheses.  Therefore, I think the DBs and columns were created properly.

The formula works correctly and is displayed correctly, i.e. as shown in parentheses above.  Also, updating values in the DBs correctly updates the cell with the formula.  However, after a save and reload, the formula still works correctly, but now it's displayed without DB or column names, like this:

        =$Sheet1.$B$5:$B$7+$Sheet1.$G$5:$G$7

Calc should display the formula as it did before the save/reload, like this:

        =Jack[yes]+Diane[yes]

I can use "Data / Define Range" to display DB definitions, and they are still correct.  Everything seems to work correctly,  Just the formula's display is wrong.

The number of DBs, number of columns, and complexity of the formula all seem to be irrelevant.  The problem occurs even with 1 DB, 1 column, and a formula like "=Jack[yes]".

Steps to Reproduce:
1. Start Calc, and open a new ODS spreadsheet.
2. Enter some columns of numbers with column labels at the top.
3. Use "Data / Define Range" to create a DB.  Option "Contains column labels" should be set.
4. In another cell, enter a formula which references a column of the DB, e.g. "=Jack[yes]".
5. Note that the formula produces the correct result in the cell, and it's displayed properly in the formula bar.
6. Save and reload the ODS file.
7. Note that the formula still produces the correct result in the cell, but it's NOT displayed properly in the formula bar.

I will attach a file demonstrating the problem.

Actual Results:
The formula works, but it's displayed incorrectly in the formula bar, e.g. "=$Sheet1.$B$5:$B$7+$Sheet1.$G$5:$G$7"

Expected Results:
The formula should work, and it should be displayed correctly in the formula bar, e.g. "=Jack[yes]+Diane[yes]"


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Under "Tools / Options", on the "LibreOffice Calc / Calculate" pane, my "Automatically find column and row labels" is turned off.
Comment 1 Richard Kelly 2023-09-18 21:35:42 UTC
Created attachment 189678 [details]
ODS file demonstrating the problem

Note that cell M5's formula is displayed like this:

        =$Sheet1.$B$5:$B$7+$Sheet1.$G$5:$G$7

It should be displayed like this:

        =Jack[yes]+Diane[yes]
Comment 2 m_a_riosv 2023-09-19 21:56:10 UTC
Please take a looke into
https://wiki.documentfoundation.org/ReleaseNotes/5.1#Table_structured_references
Only possible to save in xlsx format.