[Libreoffice-bugs] [Bug 93045] FILESAVE: custom styles lost on saving to XLSX (Summary in Comment 6)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Sep 20 14:01:24 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=93045

--- Comment #32 from Rob <robert at bobslog.com> ---
Possibly related I too had xlsx files that the alignments rendered correctly in
Excel but wrong in LO if they originated from sources other than Excel.
i.e.
1. create xlsx in Excel, alignment all OK in both Excel and LO
2. create xlsx in non excel source, alignment OK in Excel, alignment wrong in
LO

It turned out [in my case] the styles.xml had a difference,
- those files created in Excel included: applyAlignment="true" in the elements
within the cellXfs section of styles.xml
- those files created outside Excel didn't include this item, (adding this
fixed the problem*.)

(* in my case the "outside Excel" source was from a package called EPPlus, I
patched my own copy to include the: applyAlignment="1" where necessary.)

Another way of looking at it:
Excel: styles default for applyAlignment is True (or 1) [ if allignment items
are present]
LibreOffice: styles default for applyAlignment is False (or 0) unless
explicitly set

so either:
(1) need to patch the originator of your xlsx files to include that
applyAlignment="1"/"True" item in the styles.xml,
or 
(2)patch LibreOffice to change it's default to True.

- In my case #1 was much easier.
- The LibreOffice maintainers would need to decide if #2 is an appropriate /
permanent fix and is so apply it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180920/1de725a0/attachment.html>


More information about the Libreoffice-bugs mailing list