Bug 158460 - "Wrap text automatically" settings are changed when xlsx/xls export include cell line breaks
Summary: "Wrap text automatically" settings are changed when xlsx/xls export include ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.2.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xls, filter:xlsx
Depends on:
Blocks: Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2023-11-30 12:28 UTC by Shinji Enoki
Modified: 2023-12-01 20:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Excel: a cell with a line break with wrap disabled (51.92 KB, image/png)
2023-11-30 18:10 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shinji Enoki 2023-11-30 12:28:37 UTC
Description:
Export xlsx/xls with "Automatically wrap text" turned off for cells containing line breaks with Ctrl+Enter, and when you open it again, the wrapping setting is turned on.

Steps to Reproduce:
1.enter any text
2.Press Ctrl+Enter to break a line in the middle of text
3.Right click on that cell -> Format Cells -> Alignment tab
4.Make sure "Wrap text automatically" of Properties, is turned off
5.Export to xlsx or xls file
6.Open xlsx/xls file
7.Check "Wrap text automatically" setting

Actual Results:
"Wrap text automatically" setting is turned on

Expected Results:
"Wrap text automatically" setting is turned off


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: en-US
Calc: threaded

I checked and reported based on the information in the Ask below:
https://ask.libreoffice.org/t/topic/98573
Comment 1 jun meguro 2023-11-30 12:30:52 UTC
Issue has been reproduced.
Comment 2 Saburo 2023-11-30 12:48:18 UTC
I reproduced it

Version: 7.6.3.2 (X86_64) / LibreOffice Community
Build ID: 29d686fea9f6705b262d369fede658f824154cc0
CPU threads: 12; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded
Comment 3 ady 2023-11-30 13:00:50 UTC
Also repro with Latin fonts, so it is not related to CTL nor specific to Japanese fonts.

Saving as ods is fine.
Comment 4 ady 2023-11-30 17:48:31 UTC
There are several similar reports about exporting or saving the "wrap text automatically" cell attribute to either xlsx or to xls, but please note:

* a cell containing multiple lines ([CTRL]+[ENTER]), with wrap text ON, exports correctly;

* a cell containing multiple lines ([CTRL]+[ENTER]), with wrap text OFF, exports with wrap text ON.

IOW, a cell containing multiple lines (with each line introduced with [CTRL]+[ENTER] within the same cell) is _always_ exported with wrap text ON > BUG.

Also note that the way the text is displayed within the cell is not necessarily an indication of the status (ON/OFF) of the "wrap text automatically" attribute. You have to either check the cell properties or the status of the related icon on the toolbar.
Comment 5 Mike Kaganski 2023-11-30 18:10:09 UTC
Created attachment 191147 [details]
Excel: a cell with a line break with wrap disabled

I *suspect* that this is required in Excel: from a quick test, disabling wrap in a cell there merges the lines into a single line.

Code reading is necessary, but most likely this it NOTABUG / NOTOURBUG (because it's an external application limitation).
Comment 6 watanabe nobuo 2023-12-01 07:39:38 UTC Comment hidden (off-topic)
Comment 7 Mike Kaganski 2023-12-01 07:49:02 UTC Comment hidden (off-topic)