Bug 52578 - FILESAVE: XLSX "thin" and "medium" cell border widths increment until "thick"
Summary: FILESAVE: XLSX "thin" and "medium" cell border widths increment until "thick"
Status: RESOLVED DUPLICATE of bug 75130
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: All Windows (All)
: medium major
Assignee: Not Assigned
: 59860 64555 (view as bug list)
Depends on:
Reported: 2012-07-27 09:49 UTC by Dave Jakeman
Modified: 2014-03-08 08:09 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

Example cell border widths (ODS/XLSX) showing incrementing values. (79.95 KB, application/zip)
2013-06-04 02:39 UTC, Owen Genat (retired)

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Jakeman 2012-07-27 09:49:14 UTC
When a cell border width is set to a non-default value, that value is botched via a Microsoft XML (.xlsx) filesave/reload.  When ODF format is used, the border width value is properly preserved.

To reproduce: create a new spreadsheet, set a cell border to a non-default width, save and reload via MS XML format:

1.  Create a new spreadsheet
2.  Right-click a cell and select "Format cells..."
3.  Click on the "Border" tab
4.  Click on a Line Arrangement button to give the cell some border lines
5.  Click the up-arrow at the right of the "Width" field to give the border a non-default width.  The value will change from 0.05pt to 0.30pt
6.  Click "OK"
7.  Save the spreadsheet as "Microsoft Excel 2007/2010 XML (.xlsx)" format
8.  Close the spreadsheet
9.  Re-load the spreadsheet

The border width of the cell will now be 1.00pt, not the intended 0.30pt.  With each successive filesave/reload, the border width increases, up to a maximum of 4.00pt: 0.30pt -> 1.00pt -> 2.50pt -> 4.00pt.

Applying a border width of the default value (0.05pt) gives correct behaviour after an MS XML filesave/reload.

Following steps 1-9 but using "ODF Spreadsheet (.ods)" format gives correct behaviour, whatever the width value.

This may be related to Bug 52257.
Comment 1 Dave Jakeman 2012-07-27 14:00:41 UTC
Just tried upgrading to V3.5.5.3 and the bug is in that version too.
Comment 2 Noel Grandin 2012-09-05 09:48:03 UTC
Confirmed in
Comment 3 Roman Eisele 2012-09-05 15:32:13 UTC
Related to Bug 53287 - "FORMATTING: cell border too bold when importing xls"? The present bug is about .xlsx and bug 53287 is about .xls file format, but both file formats are related ...
Comment 4 Thomas Arnhold 2013-02-10 18:03:51 UTC
Maybe related Bug #60599 and Bug #58356
Comment 5 Owen Genat (retired) 2013-06-04 02:39:42 UTC
Created attachment 80256 [details]
Example cell border widths (ODS/XLSX) showing incrementing values.

The bug as-is appears to raise two distinct issues: 1) non-OOXML-standard cell border value are changed to OOXML-standard cell border values when saving in XLSX format; 2) some cell border values are subsequently incremented after each re-save to XLSX.

(1) is not a bug it is a compatibility feature. There are a limited number of valid cell border widths under OOXML. ECMA-376 4th Ed, ยง18.18.3 offers "hair" (0.05pt), "thin" (1.00pt), "medium" (2.50pt), and "thick" (4.00pt). The LO implementation has been altered (circa v3.5) to support this. The referred bug #52257 probably needs to be RESOLVED as NOTABUG as per bug #51178.

(2) is a separate issue and this bug needs its title changed to reflect this fact. I can confirm repeated saving of an XLSX under GNU/Linux TDF/LOv4.0.3.3 results in initial incrementation of the cell border value as described. That is, the initial save from ODS to XLSX results in the four OOXML border widths being set. A subsequent edit and save of the XLSX (using LO) results in cell borders using the "thin" and "medium" values being set to "thick". Repeated saving then has no effect with all cells set to either "hair" or "thick". This is possibly related to bug #53287 as indicated by Roman in comment #3 but I am uncertain. To reproduce this issue:

1. Open attached ODS.
2. Export to PDF (or compare with included PDF).
3. Save as XLSX (this is *_1st.xlsx).
4. Close file.
5. Open *_1st.xlsx
6. Export to PDF (or compare with included PDF).
7. Save as XLSX (this is *_2nd.xlsx).
8. Close file.
9. Open *_2nd.xlsx
10. Export to PDF (or compare with included PDF).
11. Save as XLSX (this is *_3rd.xlsx).
12. Close file.
13. Open *_3rd.xlsx
14. Export to PDF (or compare with included PDF).

At step 5-6 note all four different cell border widths exist. At step 9-10 note only two different cell border widths exist ("hair" and "thick"). At step 13-14 note the same two cell border widths exist.
Comment 6 Owen Genat (retired) 2013-06-04 06:46:43 UTC
*** Bug 59860 has been marked as a duplicate of this bug. ***
Comment 7 Owen Genat (retired) 2013-06-07 11:53:24 UTC
*** Bug 64555 has been marked as a duplicate of this bug. ***
Comment 8 Kohei Yoshida 2014-03-08 08:09:07 UTC

*** This bug has been marked as a duplicate of bug 75130 ***