It is different at the binary level

hi. I have an excel file and my OS is ubuntu. so I need to open the excel file and do some changes, lets’s say change 0 to 0 from the keyboard nothing else. when I close the excel file it is saved as an excel file. when I check the difference in the terminal it shows that it is different at the binary level. how could do changes and meanwhile keep unchanged the .xlsx? I guess something in the formatting is changed. though the fonts are the same, even I tried without formatting

Every time you import some file format into some application, the file format is converted to the application’s native file format.
Every time you export some foreign file format, the file format is converted from the application’s native file format into the export file format.

when I try to open the same .xlsx file in java before changing it is ok. but when I do some changes (typing 0 instead 0 from the keyboard) it is not ok, something is changed at the binary level and errors throw.

That is something different from the original description (“it is different at the binary level” is perfectly fine for a modified document). Do file a bug report, with a sample original document, exact steps what to do in it to produce the problem, and full information from Help|About.

1 Like

I can’t give a definitive answer for your specific file. Here is however the generic situation.

.xlsx is a proprietary M$ format. Some of its encoding have been guessed by developers but the whole thing is not completely understood. In addition, being a proprietary closed format, Micro$oft is free to change it at will.

When you open such a file with Calc, a first conversion occurs to translate it into an internal form fit for manipulation in memory. This conversion is done according to what developers understood in the format, meaning some interpretation always occurs and some directives may be ignored because there is no guess about their usage.

When you save the file, even if you feel nothing has changed semantically (i.e. replacing a 0 by itself), a second conversion is done from the internal form to the foreign format. The internal structures, which may not contain all the data from the original file, are again translated according to what is mastered in the format, the rest being “interpolated” or “extrapolated” based on elementary directives.

As a consequence, the newly saved file will always be different from the original one build by its intended application. Note that there is a high risk of information loss.

If you want to store reliably your data, always save in native format.

2 Likes