Bug 168589 - SUBTOTAL in Excel change when opened in Calc
Summary: SUBTOTAL in Excel change when opened in Calc
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.8.1.1 release
Hardware: All All
: medium normal
Assignee: Balázs Varga
URL:
Whiteboard: target:26.2.0 target:25.8.3
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Function-Subtotal
  Show dependency treegraph
 
Reported: 2025-09-28 16:09 UTC by Graham L
Modified: 2025-10-02 08:08 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Accounting cashbook - error occurs on "Balances" sheet. (7.44 MB, application/vnd.ms-excel)
2025-09-28 16:09 UTC, Graham L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham L 2025-09-28 16:09:37 UTC
Created attachment 203009 [details]
Accounting cashbook - error occurs on "Balances" sheet.

On the "Balances" sheet of the workbook that I have uploaded, the figures in each column of line 6 are intended to be the sum of the figures immediately below.

This works correctly in Microsoft Excel, running on a Windows 8 laptop, but when the workbook is opened on a Windows 11 laptop using LibreOffice 25.8, the figures on line 6 are the same as on line 7.

For example, the line 6 formula in cell E6 should be =SUBTOTAL(9,E7:E27)
However, when opened with LibrOffice, the formula appears as =SUBTOTAL(9,E5:E7)
Comment 1 nobu 2025-09-28 22:05:52 UTC
Not reproducible
Version: 25.2.6.2 (X86_64) / LibreOffice Community
Build ID: 729c5bfe710f5eb71ed3bbde9e06a6065e9c6c5d
CPU threads: 2; OS: Linux 6.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded

===

Reproducible
Version: 25.8.1.1 (X86_64)
Build ID: 54047653041915e595ad4e45cccea684809c77b5
CPU threads: 2; OS: Linux 6.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded
Comment 2 raal 2025-09-29 14:29:29 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-25.8.
Adding Cc: to Balazs Varga ; Could you possibly take a look at this one?
Thanks
 6b5cefb5b741814ec78eb5663fd632619c7c88c2 is the first bad commit
commit 6b5cefb5b741814ec78eb5663fd632619c7c88c2
Author: Jenkins Build User <tdf@maggie.tdf>
Date:   Mon Feb 3 13:03:01 2025 +0100

    source b89047a0f0100fb30121084cf42815aa792c1f88

180773: tdf#164843 - sc optimize "SubTotal" function's reference ranges | https://gerrit.libreoffice.org/c/core/+/180773
Comment 3 Commit Notification 2025-10-01 21:34:16 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/fdf6777e02f4897bdb798457d3e6b8fbd343f8ab

tdf#168589 - sc fix xls import with subtotal function

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2025-10-02 08:08:17 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/83f80f46bfec8e023727db2d87c22876a2ddf6bd

tdf#168589 - sc fix xls import with subtotal function

It will be available in 25.8.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.