Bug 168236 - vstack, hstack, tocol, torow short parameters format failure
Summary: vstack, hstack, tocol, torow short parameters format failure
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.8.1.1 release
Hardware: All All
: medium enhancement
Assignee: Xisco Faulí
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Function
  Show dependency treegraph
 
Reported: 2025-09-01 15:59 UTC by Toli Judov
Modified: 2025-09-07 07:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file with short VSTACK parameters (12.49 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2025-09-01 16:03 UTC, Toli Judov
Details
Test file with full VSTACK parameters (12.21 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2025-09-01 16:04 UTC, Toli Judov
Details
Screenshot of a failed document (26.92 KB, image/png)
2025-09-01 16:09 UTC, Toli Judov
Details
Screenshot with full parameters format which works (38.34 KB, image/png)
2025-09-01 16:10 UTC, Toli Judov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toli Judov 2025-09-01 15:59:58 UTC
Description:
We've found an issue with some .xlsx documents that use VSTACK() function.
LibreOffice has support for this function, but only for full parameter format. However, some other programs produce documents with short parameter format, which results in Err:504 error.

Example:

Here's the short format that works in cloud Excel:
=VSTACK(Sheet1:Sheet4!A1:F2)
This formula will produce Err:504 in all related cells.

Here's the full format of the same formula:
=VSTACK(Sheet1!A1:F2; Sheet2!A1:F2; Sheet3!A1:F2; Sheet4!A1:F2)
This works fine in LibreOffice.

Steps to Reproduce:
There's a small simple synthetic file attached to the bug.
Download the file and open it in LibreOffce.

2. Switch to Sheet 5 — there will be Err:504 errors
3. Fix formula so it would use full parameters format: =VSTACK(Sheet1!A1:F2; Sheet2!A1:F2; Sheet3!A1:F2; Sheet4!A1:F2) — now Sheet 5 contains data from all other sheets.

Actual Results:
Sheet 5 contains Err:504 errors in cells from A1 to F8.

Expected Results:
Fix formula so it would use full parameters format: =VSTACK(Sheet1!A1:F2; Sheet2!A1:F2; Sheet3!A1:F2; Sheet4!A1:F2)

Now Sheet 5 contains data from all other sheets.


Reproducible: Always


User Profile Reset: No

Additional Info:
I've tested it on my MacOS, but the same happens in linux as well.
Comment 1 Toli Judov 2025-09-01 16:03:38 UTC
Created attachment 202643 [details]
Test file with short VSTACK parameters

Test file with short VSTACK parameters — doesn't currently work in LibreOffice
Comment 2 Toli Judov 2025-09-01 16:04:43 UTC
Created attachment 202644 [details]
Test file with full VSTACK parameters

Test file with full VSTACK parameters — works well in LibreOffice
Comment 3 Toli Judov 2025-09-01 16:09:32 UTC
Created attachment 202645 [details]
Screenshot of a failed document
Comment 4 Toli Judov 2025-09-01 16:10:51 UTC
Created attachment 202646 [details]
Screenshot with full parameters format which works
Comment 5 Xisco Faulí 2025-09-01 18:51:00 UTC
Thanks for reporting this issue.
I can reproduce it in

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 09a48f45d9a3e72ab761e6808701362c9c0b2e51
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

Since I implemented the support for VSTACK function, I'll take a look at some point
Comment 6 Xisco Faulí 2025-09-02 18:39:38 UTC
Same behaviour with the TOCOL, TOROW functions