What's the difference between and in Office Open XML?

前端 未结 1 1932
渐次进展
渐次进展 2021-01-18 04:55

What\'s the difference between these two Office Open XML fragments?


  btyler

and

相关标签:
1条回答
  • 2021-01-18 05:10

    According to the documentation at 18.18.11 ST_CellType:

    str (String) Cell containing a formula string.

    So you would only use your first example if a formula was in the <x:v> element.

    The second one is used for inline strings and the <x:c> element should have a t attribute of 'inlineStr'. This will just be rich text that will be outputted and not stored in the sharedstring table.

    So your first one would be valid like this:

    <x:c r="C6" s="1" vm="15" t="str">
       <x:f>CUBEVALUE("xlextdat9 Adventure Works",C$5,$A6)</x:f>
       <x:v>2838512.355</x:v>
    </x:c>
    

    Your second one would be valid like this:

    <x:c r="B2" t="inlineStr">
       <is><t>btyler</t></is>
    </c>
    
    0 讨论(0)
提交回复
热议问题