Here are the steps I am following to examine the behavior:
1# Create an Excel(xlsx) file, put 1234.56789 in a cell, save it.
2# Extract the .xlsx file, see the sheet1.xml and styles.xml files.
In the xl/worksheets/Sheet1.xml you will see following:
<sheetData><row r="1" spans="1:1" x14ac:dyDescent="0.25"><c r="A1" s="1"
<v>25778.567889999998</v>
</c></row></sheetData>
And there is no information in the Styles.xml about the precision of the original number which is 1234.56789
.
How does Excel show the original value when we open it in MS Excel?
How does it reconstruct that original number although there is no information in the extracted files?
Note that I did not change the cell format type or anything, so the cell format is General.
I understand that because Excel is storing the number as floating point, it cannot save the value to perfect accuracy, what I can't understand is how it retains the original value when I open that in MS Excel. I am facing an issue regarding reading Excel files using OpenXML SDK, but before asking about that issue I am looking for answer to this more fundamental question.