Steps to reproduce: 1. Type in " abc" in A1 (there are three spaces before the letters). 2. Save as xlsx; 3. Reopen with MSO. --> It shows "abc" when open with MSO, the spaces are not preserved. 4. Reopen the xlsx with LibreOffice --> It shows " abc" in A1 as expected. More info: Unzip the xlsx file, you will find in \xl\sharedStrings.xml: <t> abc</t> When you create a same xlsx file using MSO 2010, you will find in \xl\sharedStrings.xml: <t xml:space="preserve"> abc</t> Aparently the attibute xml:space="preserve" matters. Version: 4.4.0.1 Build ID: 1ba9640ddd424f1f535c75bf2b86703770b8cf6f Locale: zh_CN Win 7 X86
Created attachment 111885 [details] test file created using LibreOffice 4.4.0.1
Created attachment 111886 [details] test file created using MSO 2010
I can confirm with Version: 4.5.0.0.alpha0+ Build ID: 7f476fea47f06a7f8cc961dd4f6595a524346fa5 TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-12-27_23:36:28
So to make things really funny. This is a MSO bug and not a LibreOffice bug. Not laughing yet, there is also a nice bug around that in the OOXML spec. They mention the attribute in the spec but forgot to include it in the xsd schema so the validator is flagging that attribute. We are going to include that attribute as soon as I have an idea how to fix our validator.
Markus Mohrhard committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3004221e47918eb08cfa98ba43a23a0b25412cd5 preserve whitespaces here, tdf#88137, tdf#89254 It will be available in 5.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Markus Mohrhard committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3b0aae379e77dade4bde1f832225728ce6214816 add unit test for tdf#88137, tdf#89254 It will be available in 5.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Katarina Behrens committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=825f8422bb2cce52bd3095a63de14b34b32ae37c tdf#88137, tdf#89254: Preserve whitespace also in formatted strings It will be available in 5.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.