Forum Discussion

ronrsnfld's avatar
ronrsnfld
Super User
1 year ago
Solved

Excel Rich data types

Five years ago it was the case that Power Query could not access Excel Rich Data Types (eg Stock, Geography) directly. Reading a table would result in   "DataFormat.Error: Invalid cell value '#VALU...
  • ZhangKun's avatar
    ZhangKun
    1 year ago

    Yes, it is very complicated, and I don't think I can explain it to you in English (even with the help of translation software). It probably indexes the values ​​in the following order:

    1. In the file xl/worksheets/sheet1.xml, find the vm attribute value of the c tag and go to the next step.
    2. In the file xl/metadata.xml, the rc tag under valueMetadata>bk has attributes t and v. According to t attribute value, go to the metadataTypes tag to determine the metadata type (find the name attribute value). Find the futureMetadata tag corresponding to the previous name, and then find the i attribute value of the xlrd:rvb tag under this tag.
    3. Each rv tag index under the file xl/richData/rdrichvalue.xml corresponds to the previous i attribute value. Each v tag in the rv tag just displays the value, and you also need to find the corresponding s tag under the file xl/richData/rdrichvaluestructure.xml through the s attribute value of the rv tag. Each k tag here corresponds to the v tag mentioned above.

    It should be noted that when searching, some indexes start from 0 (such as the s attribute value under the rv tag), and some start from 1 (such as the vm attribute value).

    I am very busy at this time. If I have time later, I think I will draw a more understandable diagram to explain this process.