If a cell contains a trailing space, the space is copied literally to the content of the <text:p> tag for the cell rather than being encoded as a <text:s/> tag:
<table:table-cell office:value-type="string" calcext:value-type="string">
I'm not familiar with the ODS spec so I don't know whether a literal space is permitted in this context, but at least some versions of Excel seem to discard the space. (LibreOffice itself preserves the space without problems.)
To reproduce, create a new Calc document, enter the text " spaces " in the first cell, and save as ODS.
I confirm the behaviour as mentioned by the bug reporter. I also confirm that this ods file when open in MSO 2010 the last space is not shown.
But I am not sure whether this is a bug of LibreOffice or not.
Adding keyword implementationError, needsDevEval.
The ODF specification says:
> The <text:s> element is used to represent the [UNICODE] character “ “ (U+0020, SPACE).
> This element shall be used to represent the second and all following “ “ (U+0020, SPACE) characters in a sequence of “ “ (U+0020, SPACE) characters.
> Note: It is not an error if the character preceding the element is not a white space character, but it is good practice to use this element only for the second and all following “ “ (U+0020, SPACE) characters in a sequence.
@Regina, Do you have any insight here?
I have no strong opinion yet. Whitespace handling is still an issue in the TC, see OFFICE-3706 and OFFICE-3828