Can someone confirm how Microsoft Excel 2007 internally represents numbers?

走远了吗. 提交于 2019-12-04 08:36:41

Excel 2007 supports the OpenXML format which is a ZIP file (.XLSX) containing a bunch of XML files. There is an SDK to work with the OpenXML format you can get the docs for it here, and download it here.

Basically numbers are stored as plain text within a element so if cell A1 has the number 42 and cell A2 has the number 81.56 in the UI, the XML would look like the follow XML fragment:

<row r="1" spans="1:2">
    <c r="A1">
        <v>42</v>
    </c>
    <c r="B1">
        <v>81.569999999999993</v>
    </c>
</row>

When working with OpenXML I would highly recommend just using the SDK and not going after it on your own.

This page has a reference for internal Excel data types.

It stored the numbers as double.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!