Bug 168315 - calc hangs on particular xlsx file
Summary: calc hangs on particular xlsx file
Status: UNCONFIRMED
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: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2025-09-08 06:26 UTC by Vladimir Lomov
Modified: 2025-09-09 18:21 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
File with conditional formatting (480.14 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2025-09-08 06:27 UTC, Vladimir Lomov
Details
Broken file cleaned (349.05 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2025-09-09 03:59 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Lomov 2025-09-08 06:26:35 UTC
Description:
Calc hangs while trying to open particular xlsx file.

Steps to Reproduce:
1. Download file `broken.xlsx` (https://isu.bkoty.ru/broken.xlsx) (I'll try to attach to the ticket if possible).
2. Try to open attached xlsx file.

Actual Results:
The calc application hangs on opening.

Expected Results:
The file should be open fine.


Reproducible: Always


User Profile Reset: No

Additional Info:
Microsoft Excel (365) opens it fine, though:
- when exporting to Excel 97/2003 format Excel warns about loosing functionality, namely conditional formatting;
- on the other hand, if I try to export to ODS format the Excel hangs.
Comment 1 Vladimir Lomov 2025-09-08 06:27:57 UTC
Created attachment 202730 [details]
File with conditional formatting

Calc hangs on opening the file
Comment 2 Vladimir Lomov 2025-09-08 06:49:56 UTC
I should correct myself:
- there problem exists on Linux (Archlinux, libreoffice-fresh package);
- the Libreoffice Calc on Windows 10 opens file, but it takes some time, and it is almost impossible to work with file as the Calc is hanging from time to time while utilizing one CPU core completely.

Still, opening and closing the file makes Calc unresponsible for some time (Windows 10, 25.8.1.1).
Comment 3 m_a_riosv 2025-09-08 21:52:28 UTC
Seems the main issue is with the conditional format with a range:
A1:XFD65437 (1072119808 cells)
in tab Каф 07 ВБ
There are also a lot of conditional formats with complex ranges, but not so large.

Deleting the CF for A1:XFD65437, makes the spreadsheet much more responsive after save and open it againg.


Version: 25.8.1.0.0+ (X86_64) / LibreOffice Community
Build ID: 1e040b72222012f9a5f1e47d19aaf0c0369e08ad
CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 4 Vladimir Lomov 2025-09-09 02:06:12 UTC
Thank you.

I tried the following:
- opened `broken.xlsx` in Microsoft Excel (365) and removed the CF rule from the tab 'Каф 07 ВБ';
- saved the file as `broken_2.xlsx` and tried to open it with LC (Libreoffice Calc). The file seemed to open a bit faster, but it was still difficult to work with.

Next, I tried to open `broken.xlsx` in LC (on Windows) and removed the CF rule (identified as 'A1:XFD65437'), saved the file as `broken_2_lc.xlsx`, and then as `broken_2_lc.ods`. However, both files were still difficult to work with, especially when compared to Excel, where the file opens quickly and works smoothly.

On my Linux box (Archlinux, Hyprland), neither of the files could be opened. LC tries to open them, consumes CPU, but the window doesn't display the document.

I assume that

> There are also a lot of conditional formats with complex ranges

may be the root cause of the problem, but I'm not experienced enough to judge here.

P.S. I'm not using neither Excel nor LC. The file in question I got from a colleague who actually uses LC (Archlinux, KDE), but she didn't create the file herself, but got from other person (as part of some office work).
Comment 5 m_a_riosv 2025-09-09 03:59:13 UTC
Created attachment 202758 [details]
Broken file cleaned

After cleaning up all the columns beyond the data in each sheet, it seems to be much smoother.

In any case, check whether Menu>Tools>Options>LibreOffice>OpenCL is enabled in your installation.
Comment 6 Vladimir Lomov 2025-09-09 06:18:42 UTC
Thanks!

The file `broken3.xlsx` opens fine in LC (on Linux).

If I understand you correctly, you simply changed the ranges in the CF of the original file, which are beyond the actual number of rows, right?

I checked LC on my Linux box and OpenCL wasn't enabled. However, after I enabled it I could open the `broken_2_lc.ods` file (opened in LC on Windows and saved as ODS). As for LC on Windows, the OpenCL was enabled (by default?).

Overall, the problem of opening such files with LC remains unresolved (on Linux, not sure about Windows). For the current issue, I used a workaround by saving the original .xlsx file in Excel (on Windows) as .xls (97-2010) one, but of course, this loses all the CF and only works if you have access to Excel (and Windows).
Comment 7 m_a_riosv 2025-09-09 17:43:34 UTC
There were two different things here.
1.- A1:XFD65437 (1072119808 cells) in tab Каф 07 ВБ.
Deleting it gives a better performance.

2.- Deleting all columns beyond the last with data in every sheet.
This is what makes a difference.
I didn't look in it deeply, but seems there were format cells and/or columns in a lot of them. When doing that in some sheets takes a bit more time to delete the columns.