Inlinestring vs String - what’s the difference?

Asked

Viewed 67 times

3

In the creation of some spreadsheets with Openxml, I came to doubt the difference between:

  • CellValues.InlineString
  • CellValues.String

There is some practical difference when inserting texts (e.g.: "hello world"; "stackoverflow")?

1 answer

3


I went to find a response in the OS who speaks of this:

  • CellValues.String

It is used to store the text of the formula used in the cell. XML would look:

<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>
  • CellValues.InlineString

It is used to store formatted text in the cell as opposed to being the cell code. Note that the normal would be to use the SharedStringTable for that. XML would be:

<x:c r="B2" t="inlineStr">
   <is><t>test string</t></is>
</c>

I put in the Github for future reference.

Documentation.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.