Bug 140032 - Double-line cell borders not exported to XLSX and XLS
Summary: Double-line cell borders not exported to XLSX and XLS
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xls, filter:xlsx
Depends on:
Blocks: Cell-Border
  Show dependency treegraph
 
Reported: 2021-01-31 11:31 UTC by Johnny_M
Modified: 2024-02-24 02:18 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
ODS original for test (7.65 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-01-31 11:31 UTC, Johnny_M
Details
XLSX export (4.72 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2021-01-31 11:32 UTC, Johnny_M
Details
ODS in LO (correct) (23.67 KB, image/png)
2021-01-31 11:33 UTC, Johnny_M
Details
ODS in MSO (correct) (19.34 KB, image/png)
2021-01-31 11:33 UTC, Johnny_M
Details
XLSX in LO (issue) (19.06 KB, image/png)
2021-01-31 11:34 UTC, Johnny_M
Details
XLSX in MSO (issue) (18.80 KB, image/png)
2021-01-31 11:34 UTC, Johnny_M
Details
XLSX export usng Excel (correct) (8.84 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2021-01-31 11:58 UTC, Johnny_M
Details
XLS export usng Excel (correct) (27.50 KB, application/vnd.ms-excel)
2021-01-31 11:59 UTC, Johnny_M
Details
Video of test step 1 (340.74 KB, video/mp4)
2021-03-27 11:54 UTC, Johnny_M
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johnny_M 2021-01-31 11:31:32 UTC
Created attachment 169320 [details]
ODS original for test

Double-line cell borders are lost when the file is saved to XLSX and reopened. When re-opened in LO, single-line borders are shown. (While when re-opened in MSO 365 Excel, dotted-line borders are shown, which is the bug 79787.)
MSO 365 Excel correctly displays the original ODS file.

Steps to reproduce:
1. Set borders for a cell, configure them to be double-line borders. (Or open the attached ODS test file example.)
2. Save the file to ODS and re-open the ODS file in MSO 365 Excel.
3. Export the file to XLSX.
4. Open the XLSX file in LO.
5. Open the XLSX file in MSO 365 Excel.

Expected results:
2. Double-line cell borders are shown.
4. Double-line cell borders are shown.
5. Double-line cell borders are shown.

Actual results:
2. Double-line cell borders are shown. (OK)
4. Single-line cell borders are shown. (Not OK)
5. Single-line cell borders are shown (as dotted-line borders - separate bug 79787). (Not OK)


Occurs on Windows (portable LO release):
Version: 7.0.4.2 (x86)
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: en-US (de_DE); UI: en-US
Calc: threaded

And on Ubuntu Linux (official package):
Version: 7.0.3.1
Build ID: 00(Build:1)
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: de-DE (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.0.3-0ubuntu0.20.10.1
Calc: threaded
Comment 1 Johnny_M 2021-01-31 11:32:36 UTC
Created attachment 169321 [details]
XLSX export
Comment 2 Johnny_M 2021-01-31 11:33:10 UTC
Created attachment 169322 [details]
ODS in LO (correct)
Comment 3 Johnny_M 2021-01-31 11:33:43 UTC
Created attachment 169323 [details]
ODS in MSO (correct)
Comment 4 Johnny_M 2021-01-31 11:34:05 UTC
Created attachment 169324 [details]
XLSX in LO (issue)
Comment 5 Johnny_M 2021-01-31 11:34:31 UTC
Created attachment 169325 [details]
XLSX in MSO (issue)
Comment 6 Johnny_M 2021-01-31 11:58:30 UTC
Created attachment 169326 [details]
XLSX export usng Excel (correct)

When the ODS file is opened in MSO 365 Excel and exported to XLSL there, double-line borders are shown correctly on subsequent reopening both, in LO and Excel.
Comment 7 Johnny_M 2021-01-31 11:59:44 UTC
Created attachment 169327 [details]
XLS export usng Excel (correct)

Exactly the same behaviour if the older XLS format is used instead of the XLSX.
Comment 8 Timur 2021-03-03 13:07:30 UTC
Repro 7.2+, filesave of ODS as XLSX or XLS in LO is wrong both in LO and MSO. 
attachment 169320 [details] is simple, but bug is there for all double border types. 

All double borders were never correct but some were, like one in attachment in LO 5.0. LO 6.0 is wrong. So this is either regression or at least needs bibisect. 

Not sure why this is not the case with attachment 122863 [details] from bug 55266.
Comment 9 Buovjaga 2021-03-22 06:25:30 UTC
Something is wrong with attachment 169320 [details]. In 5.0, it is rendered with a single line style, but the format cell dialog shows a blank style in the dropdown. In 6.3 and master, it is rendered with double line style, but the format cell dialog shows single line style.

If I assign the double line style in master with a new document, there is no problem with XLSX export.

Johnny_M: how was attachment 169320 [details] created (in which version of LibO)?
Comment 10 Timur 2021-03-22 07:58:12 UTC Comment hidden (obsolete)
Comment 11 Buovjaga 2021-03-22 08:05:09 UTC
(In reply to Timur from comment #10)
> Hm, created with 7.2 alpha0.

I got curious and unzipped the file. In meta.xml there is
<meta:generator>LibreOffice/7.0.4.2$Windows_x86 LibreOffice_project/dcf040e67528d9187c66b2379df5ea4407429775</meta:generator>

So it was not created with 7.2.
Comment 12 Johnny_M 2021-03-27 11:54:46 UTC
Created attachment 170782 [details]
Video of test step 1
Comment 13 QA Administrators 2023-03-28 03:20:30 UTC Comment hidden (obsolete)
Comment 14 ady 2023-03-28 16:34:22 UTC
Creating an ods file with:
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 67bb7f71b785d3d831ffaa47262b6cbd84e71c42
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (es_AR); UI: en-US
Calc: threaded
Built 2023-03-25

...containing cells with double border style and width of 1.5pt, and then saving this ods file as xlsx, reopening the ods file and saving it as xls, all three files are shown correctly in LO and in Excel online in terms of style.

There _seems_ to be some minor difference in color. I have not tested / checked border colors, only the "double" style.

I have not tested different thickness / border widths.

I have not tested the previously-attached files.


Warning / note:

Exporting from LO as xml and opening it in LO and in Excel online > both show the xml file incorrectly, especially when testing a range of contiguous cells (as opposed to testing one cell alone, which fails too).
Comment 15 Peter S Anderson 2023-04-09 23:46:11 UTC
I have just tried to reproduce this bug using 7.5.0.3 without success. Both the the original ods and a newly created ods displayed fine in MS Excel and after saving as XLSX and then loading in Libreoffice.
Have changed status as per email to me dated 28 Mar 2023, 14:21.
Comment 16 ady 2023-04-10 00:10:39 UTC
(In reply to ady from comment #14)
> Warning / note:
> 
> Exporting from LO as xml and opening it in LO and in Excel online > both
> show the xml file incorrectly, especially when testing a range of contiguous
> cells (as opposed to testing one cell alone, which fails too).

This part (exporting XML) still needs a solution.
Comment 17 ady 2023-04-10 00:21:35 UTC
(In reply to ady from comment #16)
> This part (exporting XML) still needs a solution.

That's a new report, bug 154738 now.