Sudden corruption of .xlsx file - Bug?

I have created a .xlsx file with Calc - I was saving stuff there without an issue until yesterday. As I opened the file all data was gone apart from some headings. I have renamed and unzipped the file and after some time I found out that in the sharedStrings.xml file there were 3 blocks which were causing the problem. One of them was like this:

<si>
		<r>
			<rPr>
				<sz val="11"/>
				<color rgb="FF000000"/>
				<rFont val="Calibri"/>
				<family val="2"/>
			</rPr>
			<t xml:space="preserve">q	&#10;SortColumn referencedate&#10;SortDirection desc&#10;</t>
		</r>
		<r>
			<rPr>
				<b val="true"/>
				<sz val="11"/>
				<color rgb="FF000000"/>
				<rFont val="Calibri"/>
				<family val="2"/>
			</rPr>
			<t xml:space="preserve">startrow	75</t>
		</r>
	</si>

I have removed all between the tag and replaced it with an empty tag, zipped and renamed file and I got my file back with all data in it. The question now is why did this happen? Is it a Calc bug? What should I do in order to avoid such issues? Is it maybe a compatibility issue with .xlsx? (I also use MS Office on Windows Machines that’s why I prefer this format)

Looks like literal tab character could be the culprit, ie. q<tab>&#10; and startrow<tab>75, if so then replacing each tab character with &#9; should work.

Please tell if that (literal tab characters) actually is the case.

I don’t understand what you mean, I have my data back but I have no idea how Calc created these entries or what they mean. I don’t know if it’s somehow my fault. I have e.g. some HTML code in some cells, I don’t know if it’s related. And I cannot reproduce this issue.

Please don’t add comments as answers, because it doesn’t answer the question… use a comment instead.

Anyway, if you don’t have the original failing document anymore then there’s nothing we can inspect, the literal tabs were just a not unlikely assumption.