Bug 158252 - FILESAVE XLSX Line breaks in cells disappear
Summary: FILESAVE XLSX Line breaks in cells disappear
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
(earliest affected) alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
Whiteboard: target:24.2.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: XLSX
  Show dependency treegraph
Reported: 2023-11-17 06:40 UTC by Aron Budea
Modified: 2024-02-29 03:45 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

Sample ODS (8.78 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-11-17 06:42 UTC, Aron Budea
Screenshot (15.39 KB, image/png)
2023-11-17 13:04 UTC, m_a_riosv

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2023-11-17 06:40:20 UTC
In a spreadsheet, add multiple lines, save it as XLSX (or save the attached ODS as XLSX), and reopen it.

=> No line breaks in cell.

Observed in LO (c60a9db1f2a8e2a088c6b89bcdff4901b28f2864) / Linux.

It's a regression from the commit below. Since the same XLSX opens differently before or after this commit, it looks like the bug is on import side.
Adding CC: to Paris Oplopoios.

author		Paris Oplopoios <paris.oplopoios@collabora.com>	2023-08-28 20:40:33 +0300
committer	Paris Oplopoios <parisoplop@gmail.com>	2023-08-28 22:12:43 +0200

Shared string shouldn't account preserve space property
Comment 1 Aron Budea 2023-11-17 06:42:00 UTC
Created attachment 190886 [details]
Sample ODS
Comment 2 m_a_riosv 2023-11-17 13:04:52 UTC
Created attachment 190891 [details]

For me the line breaks remain, and they are showed in the input line, but not in the cell. And cells saved with other versions opens fine.

Version: (X86_64) / LibreOffice Community
Build ID: 5fe2bf914c251009ec4709fa8fdc45c3b53f676b
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 3 Aron Budea 2023-11-20 09:37:21 UTC
(In reply to m.a.riosv from comment #2)
> And cells saved with other versions opens fine.
Good point, thanks! I looked further, and there's a second (or rather, first) part of this regression. If the XLSX was saved in a version before the below commit, then opening in a build after the commit in the description doesn't exhibit the bug, only if it was saved in a build after this commit (the changes seem related):

author		Paris Oplopoios <paris.oplopoios@collabora.com>	2023-08-23 12:31:15 +0300
committer	Paris Oplopoios <parisoplop@gmail.com>	2023-08-28 10:27:37 +0200

sc: Fix wrapText not being applied correctly on export
Comment 4 Commit Notification 2023-11-23 15:13:55 UTC
offtkp committed a patch related to this issue.
It has been pushed to "master":


tdf#158252 sc: Enable text wrapping when inputting line breaks in cell

It will be available in 24.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:

Affected users are encouraged to test the fix and report feedback.
Comment 5 Paris Oplopoios 2023-11-23 15:14:11 UTC
Please try after the patch I just pushed.
Comment 6 Mike Kaganski 2024-02-29 03:36:27 UTC
Possibly the change in commit 17e362e56f9e15d0214c441e632c91d22e58519d could be replaced by a code specific to export. That would fix bug 159690, too.
Comment 7 Mike Kaganski 2024-02-29 03:45:22 UTC
Ah - commit 1760ee4d328cfb6ba22a5b3c84016625b12adb25 explicitly dropped this from the export.