Bug 158827 - Cant save cells borders to XLS, XLSX, but ODS all ok.
Summary: Cant save cells borders to XLS, XLSX, but ODS all ok.
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.5.9.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-22 08:38 UTC by Stanislav
Modified: 2023-12-25 06:48 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
ODS files with borders (26.66 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-12-22 11:11 UTC, Stanislav
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislav 2023-12-22 08:38:29 UTC
Hi everyone!

Cells with different thick borders and fields like 'sheet name' cannot be saved to XLS or XLSX, but ODS saves perfectly.
I saw bugreeports #75130, #88827, #151755 and other
But problems still exist.
Windows 7 SP1
Comment 1 Stanislav 2023-12-22 08:39:08 UTC
Version: 7.5.9.2 (X86_64) / LibreOffice Community
Build ID: cdeefe45c17511d326101eed8008ac4092f278a9
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: threaded
Comment 2 Mike Kaganski 2023-12-22 09:20:57 UTC
What steps specifically don't work? E.g., setting some cell borders to thick, and some to thin definitely works with XLSX in Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 24; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: ru-RU (en_US); UI: en-US
Calc: CL threaded

So please describe specific steps, or maybe just attach a sample ODS, which can't be saved to XLSX without formatting loss, and describe which cell looses what.

Note that Excel formats are limited in what border formatting they can store. E.g., border thickness is represented there as a limited set of values, defined in OOXML's ST_BorderStyle (valid values are only 'dashDot', 'dashDotDot', 'dashed', 'dotted', 'double', 'hair', 'medium', 'mediumDashDot', 'mediumDashDotDot', 'mediumDashed', 'none', 'slantDashDot', 'thick', 'thin'). You may see that it's not much of freedom to represent different thickness plus different style - which is easy in ODF. So possibly what you expect is simply impossible in the limited XLSX file format.
Comment 3 Stanislav 2023-12-22 11:11:24 UTC
Created attachment 191565 [details]
ODS files with borders

1. Create file
2. Make a table with cell borders default and 1.75 thicknesses.
3. Save ODS and Save as XLSX or XLS
4. Open XLSX or XLS file and all borders are same default thickest.
5. Open ODS and see that right borders thinkers.
Comment 4 Mike Kaganski 2023-12-22 11:26:32 UTC
This is not a bug. The optimal values of width available in Excel formats is chosen. There is no better option for *both* the default (0.75) and 1.75 exist, than Excel's "thin".

See: https://opengrok.libreoffice.org/xref/core/sc/qa/unit/data/README.cellborders?r=6777720

Try opening the ODS in Excel to see that Excel itself is unable to use different thickness, even when it definitely *is* in the file (ODS has it, of course).

Try using 2.25 (Thick) and greater thickness, to see that it works, *when* the target file format allows.

Use ODS, to make sure you use all the features supported by LibreOffice. If you use external file formats, limit yourself to the features supported by both LibreOffice and MS Office in that file format simultaneously, otherwise there is no way to ensure interoperability.
Comment 5 Stanislav 2023-12-22 12:13:55 UTC
Thank you!
You are right.
This is not a bug this is a feature ))
But field "sheet name" is lost while save to xls. Look at Q33 on sheed #2
Comment 6 Mike Kaganski 2023-12-22 12:35:52 UTC
(In reply to Stanislav from comment #5)
> This is not a bug this is a feature ))

The sarcasm is unclear. If you save to, say, TXT, you won't expect to see bold, or different fonts, or inserted images. It would only be a bug, if XLS(X) allowed for such information; the creator (MS) didn't provide such an option in the format. It is not a feature, just not a bug.

> But field "sheet name" is lost while save to xls. Look at Q33 on sheed #2

Absolutely same. There is *NO* feature in Excel - to insert fields. At all. Hence, no provision in the file format. If there were some way to store it in the format, not storing it would be a bug. But not in this case.
Comment 7 Stanislav 2023-12-25 05:47:57 UTC
I apologize for my sarcasm. Thank you for your support and contribution to open source. Wishing you a happy New Year!