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.
Just tried upgrading to V18.104.22.168 and the bug is in that version too.
Confirmed in 22.214.171.124(Windows)
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 ...
Maybe related Bug #60599 and Bug #58356
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/LOv126.96.36.199 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.
*** Bug 59860 has been marked as a duplicate of this bug. ***
*** Bug 64555 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 75130 ***