Bug 144252 - Compatibility issues with cell summation formulas across worksheets
Summary: Compatibility issues with cell summation formulas across worksheets
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xlsx
Depends on:
Blocks: XLSX-Corrupted Cell-Reference
  Show dependency treegraph
 
Reported: 2021-09-02 00:39 UTC by dongshili
Modified: 2025-08-24 03:11 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sum formula error across the same cell of the worksheet (19.95 KB, application/x-zip-compressed)
2021-09-02 00:42 UTC, dongshili
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dongshili 2021-09-02 00:39:04 UTC
Description:
=SUM($'1'.B3:$'10'.B3)

Use this formula to calculate the sum of cells B3 in worksheets 1-10; After the first creation of the formula, it works fine, but after saving it as *.xlsx and re-opening the table, the formula becomes =SUM('1':$'10'.b3 :B3), and the cell displays an error message: #NAME?



In my tests, the same tables and formulas were saved as *.xls and *.ods without error.

So I think it's a formula compatibility issue.


=SUM($'1'.B3:$'10'.B3)
使用这个公式来计算1-10工作表内B3单元格的和;在初次创建这个公式后,可以正常使用,但是保存为*.xlsx格式后,重新打开表格,公式就变成了=SUM('1':$'10'.B3:B3),单元格内显示的错误信息是:#NAME?

经过我的测试,同样的表格和公式,当保存为*.xls和*.ods格式时,并没有发生错误。
所以我认为这是一个公式的兼容性问题。

Steps to Reproduce:
1.Open my attachment test.xls or test.ods, view the formula and result, and save it as *.xlsx

Actual Results:
Open a new XLSX file, look at the formula

Expected Results:
Find problems and solve them


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Version: 7.2.0.4 (x64) / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: CL
Comment 1 dongshili 2021-09-02 00:42:02 UTC
Created attachment 174713 [details]
Sum formula error across the same cell of the worksheet
Comment 2 m_a_riosv 2021-09-05 11:15:29 UTC
Confirmed
Version: 7.2.0.4 (x64) / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 4; OS: Windows 10.0 Build 21390; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL
Comment 3 dongshili 2022-02-12 02:47:23 UTC
Why is there no response to this requirement?
Comment 4 Kevin Suo 2022-02-12 02:50:37 UTC
(In reply to m.a.riosv from comment #2)
Set to NEW per comment 2.
Comment 5 ady 2023-08-20 01:07:24 UTC
This is still repro in a recent LO Dev 24.2.

Simplified case:

* In ODS and XLS:
=SUM($'1'.D5:$'3'.D5)

* But saved as xlsx:
=SUM('1':$'3'.D5:D5)

Notes for XLSX format (ODS and XLS are OK):
* Hard Recalculate results in #NAME? error for the formula.
* The initial worksheet in the formula lacks absolute worksheet reference ($).
* The range separator (:) is present twice in the formula; once for the worksheets and once for the cells (range).

I think there is some other bug report describing a similar behavior (but I don't recall whether it was also regarding 3D ranges / functions). Maybe Eike Rathke does recall such report(?). CC'ing.

FWIW, FTR and JIC (including Sheet Naming Restrictions): 
https://help.libreoffice.org/latest/en-US/text/scalc/guide/rename_table.html
Comment 6 Eike Rathke 2023-08-24 19:34:52 UTC
Fwiw, in test.xlsx for B3 the formula is saved as

      <c r="B3" s="1" t="e">
        <f aca="false">SUM(&apos;1&apos;:&apos;10&apos;!B3:B3)</f>
        <v>#NAME?</v>
      </c>

and apparently it was resaved after having been loaded and recalculated faulty already (#NAME? error as value); not containing the $ absolute reference flag is ok, as Excel does not know relative sheet references at all and sheet references are always absolute.

Saving =SUM($'1'.B3:$'3'.B3) to .xlsx results in SUM(&apos;1&apos;:&apos;10&apos;!B3:B3) as well so that part seems ok and import  as =SUM('1':$'10'.B3:B3) is broken.
Comment 7 QA Administrators 2025-08-24 03:11:42 UTC
Dear dongshili,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug