Bug 97935 - FILESAVE, FORMATTING. Format of cells containing text with several formats is corrupted when saving as xls, xlsx
Summary: FILESAVE, FORMATTING. Format of cells containing text with several formats is...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Direct-Formatting-Parts XLSX XLS
  Show dependency treegraph
 
Reported: 2016-02-17 13:20 UTC by Fran
Modified: 2023-02-26 03:21 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
test ods file (19.34 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-02-17 13:20 UTC, Fran
Details
saved xlsx file (5.18 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2016-02-17 13:20 UTC, Fran
Details
saved xls file (6.50 KB, application/vnd.ms-excel)
2016-02-17 13:22 UTC, Fran
Details
screenshots showing differences (401.17 KB, image/png)
2016-02-17 13:23 UTC, Fran
Details
xlsx file saved by LO 5.1.4 (5.19 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2016-07-05 08:26 UTC, Fran
Details
xlsx file created with Excel 2010 (9.82 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2016-07-05 08:27 UTC, Fran
Details
Screenshot of xlsx file created with Excel 2010 (145.74 KB, image/png)
2016-07-05 09:08 UTC, Bartosz
Details
Screnshot of xlsx file saved by LO 5.1.4 (163.53 KB, image/png)
2016-07-05 09:13 UTC, Bartosz
Details
Screenshot of xlsx file created with Excel 2010 and opened with LO 5.2 (167.35 KB, image/png)
2016-07-05 10:26 UTC, Bartosz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fran 2016-02-17 13:20:03 UTC
Created attachment 122725 [details]
test ods file

The attached ods file contains simple a couple of "Lorem ipsum" sentences in each cell, with different formatting. All the cells Calibri 14 and 'Wrap text' on:

* A1: without any additional formatting to the chars.
* A2: last sentence has a smaller text size.
* A3: word "ipsum" bold.
* A4: cell with bold text.
* A5: word "ipsum" red color.
* A6: word "Lorem" underlined.
* A7: cell with red text.

When saving this file as xlsx or xls, cell formatting is corrupted and, when opening the xlsx file with Excel Viewer 2007, there are no spaces before and after words with different format. The xls file in Excel Viewer 2007 shows all the spaces but formatting is not respected.


=== Steps to reproduce ===

1. Save the attached ods file as xlsx.

2. Reopen the xlsx or xls file with LibreOffice.
Current Results (please compare with the above for expected results):

In all the cells of the sheet: Text alignment vertical changes from 'Default' to 'Align bottom'; Reference Edge in Text Orientation changes from 'Text Extension from Lower Cell Border' to 'Text Extension Inside Cell'.

* A1: Looks good.
* A2: Text not wrapped; original font (Calibri) changed to Arial; original text size (14) changes to 10.
* A3: Same as A2.
* A4: Can't see the first four words of the text.
* A5: Same as A2.
* A6: Same as A2.
* A7: Looks good.

3. Reopen the xlsx file with MS Excel Viewer 2007.
Current Results:
You will see the same bug behaviour as shown in step 2, PLUS the spaces before and after the formatted words in cells A2:A7 are missing and there is an empty first line in cells A1 and A7. Cell A4 looks good.

4. 3. Reopen the xls file with MS Excel Viewer 2007.
Current Results:
You will see the same bug behaviour as shown in step 2, PLUS there is an empty first line in cells A1 and A7. Cell A4 looks good.

Reproduced in
Version: 5.1.1.1
Build ID: c43cb650e9c145b181321ea547d38296db70f36e
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
Locale: es-ES (es_ES)

I set Severity as major because affects interoperabilty with MS Office.
Comment 1 Fran 2016-02-17 13:20:54 UTC
Created attachment 122726 [details]
saved xlsx file
Comment 2 Fran 2016-02-17 13:22:38 UTC
Created attachment 122727 [details]
saved xls file
Comment 3 Fran 2016-02-17 13:23:58 UTC
Created attachment 122728 [details]
screenshots showing differences
Comment 4 Buovjaga 2016-02-20 15:02:50 UTC
Repro.

It seems to work better in 4.3, although 4.3 does not display the red color in the original .ods!

5.0 is already changing font size in A2 and messing with wrapping in A4 (hiding overflow). But it doesn't remove the wrapping.

Win 7 Pro 64-bit, Version: 5.1.0.3 (x64)
Build ID: 5e3e00a007d9b3b6efb6797a8b8e57b51ab1f737
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
Locale: fi-FI (fi_FI)

Version: 5.2.0.0.alpha0+
Build ID: ef02de2698d90fd874bddf3146165cbe85487bc5
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-02-19_23:40:50
Locale: fi-FI (fi_FI)

5.0.2.2
4.3.0.1
Comment 5 Katarina Behrens (Inactive) 2016-03-04 11:27:51 UTC
This is a possible duplicate, or at least, subset of the issues here are covered also by bug 98083.

Therefore: can some of you guys pull a daily build, make sure it contains commit ff45bc33465d54253f9e3da2e24b1b2b09c2b1d9 and test if it helps here as well? 

And then of course please report back if issues in this bug document are fixed fully, partially or not at all

Thanks
Comment 6 Katarina Behrens (Inactive) 2016-03-06 13:45:16 UTC
To answer my own question - yes, this is a duplicate. I can't reproduce any of the issue listed here with my patch for bug 98083. 

Missing spaces in Excel were fixed as bug 96912 - should a backport be needed, please ask Markus to do so.

*** This bug has been marked as a duplicate of bug 98083 ***
Comment 7 Fran 2016-04-08 12:51:22 UTC
I've tested the attached ods file with Libreoffice 5.1.2 and some of the bugs are solved, but not all of them.

I've saved the ods file as xlsx and opened it with Libreoffice. 

I see the following: 

 * A4 cell: can't see the first four words.

 * In all the cells of the sheet: Text alignment vertical changes from 'Default' to 'Align bottom'; Reference Edge in Text Orientation changes from 'Text Extension from Lower Cell Border' to 'Text Extension Inside Cell'.

Opening the saved xlsx with MS Excel Viewer 2007:
 * There is an empty first line in cells A1 to A7, except cell A4 that looks good.
 * The spaces before and after the formatted words in cells A2:A7 are missing.
Comment 8 Bartosz 2016-07-04 09:20:42 UTC
Could you please create xlsx document with MS Excel and check if you could reproduce such issues after save to .xlsx with LibreOffice?

It will be very useful to attach both .xlsx documents, so I could provide proper fix for that, by comparing it.

Thanks
Comment 9 Fran 2016-07-05 08:26:20 UTC
Created attachment 126072 [details]
xlsx file saved by LO 5.1.4
Comment 10 Fran 2016-07-05 08:27:11 UTC
Created attachment 126073 [details]
xlsx file created with Excel 2010
Comment 11 Bartosz 2016-07-05 09:08:28 UTC
Created attachment 126074 [details]
Screenshot of xlsx file created with Excel 2010
Comment 12 Bartosz 2016-07-05 09:13:45 UTC
Created attachment 126075 [details]
Screnshot of xlsx file saved by LO 5.1.4

I cannot notice any visual difference between original (MS Excel) xlsx and that created by LO, except that sheet tabs are not preserved (Hoja1, Hoja2, Hoja3).
Could you please confirm that?

Next I will check how these documents are behave on latest LibreOffice.
Comment 13 Fran 2016-07-05 09:55:10 UTC
I've tested the attached ods file with Libreoffice 5.1.4 and some of the bugs are solved, but not all of them.

I've saved the ods file as xlsx, closed LO and opened the xlsx file with Libreoffice. 

I see the following: 

 * A4 cell: can't see the first four words.

 * In all the cells of the sheet: Text alignment vertical changes from 'Default' to 'Align bottom' (this may be caused by the 'Default' setting in LO: what is 'default'? Where can it be assigned?); Reference Edge in Text Orientation changes from 'Text Extension from Lower Cell Border' to 'Text Extension Inside Cell'.

Opening the LO saved xlsx with MS Excel Viewer 2007:
 * There is an empty first line in cells A1 to A7, except cell A4 that looks good.
 * Now there is no problem with the spaces before and after the formatted words in cells A2:A7


I've created a xlsx file with Excel 2010, trying to make it equal to the original ods.

When opening this file with Calc, it looks similar to the file saved with LO, and has the same issue in A4 cell. Text Alignment and Reference Cell values are the same than in the LO xlsx saved document.

The weirdest thing to me is that, when opening the Excel 2010 xlsx file with MS Excel Viewer 2007, there is an empty first line in cells A1 to A7, except cell A4 that looks good. Just like the LO 5.1.4 xlsx file.

Excel 2010 opens its own file without empty lines, but the one created by LO has that empty first line except in cell A4. 

When changing the zoom level in Excel 2010, the file created with Excel looks fine, but the one created with LO has an empty first line or not at different zoom levels.
Comment 14 Bartosz 2016-07-05 10:26:56 UTC
Created attachment 126077 [details]
Screenshot of xlsx file created with Excel 2010 and opened with LO 5.2
Comment 15 QA Administrators 2017-09-01 11:18:49 UTC Comment hidden (obsolete)
Comment 16 Thomas Lendo 2017-12-06 22:26:32 UTC
The last issue I found was in the exported xlsx file (same as Fran mentioned in comment 7 and comment 13):

In all the cells of the sheet: Text alignment vertical changes from 'Default' to 'Align bottom' (this may be caused by the 'Default' setting in LO: what is 'default'? Where can it be assigned?); Reference Edge in Text Orientation changes from 'Text Extension from Lower Cell Border' to 'Text Extension Inside Cell'.

Nothing else I could found.

Tested with Version: 6.1.0.0.alpha0+
Build ID: aa0b08980aba7bc82ab75151129b0c643cde7dfa
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: de-DE (de_DE.UTF-8); Calc: group threaded

Opened the original ods file and exported to xls and xlsx.
Comment 17 QA Administrators 2018-12-07 03:46:59 UTC Comment hidden (obsolete)
Comment 18 QA Administrators 2021-02-25 04:09:35 UTC Comment hidden (obsolete)
Comment 19 QA Administrators 2023-02-26 03:21:32 UTC
Dear Fran,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug