将文本添加到 xlsx OOXML 文件中的单元格?
我一直在查看 excel 生成的一些 xml 文件,并发现定义单元格的内容时,它会执行如下操作:
<c r="ABC" t="s">
<t>1</t>
</c>
其中在其他地方引用了共享字符串.xml 文件。
那么我的问题是,是否可以将文本内容直接放在标签内?像这样:
<c>
<text>ABC</text>
</c>
或者我总是需要引用外部共享字符串 xml 文件?
I've been looking at some of the xml files excel generates and have found to define the contents of a cell it does something like this:
<c r="ABC" t="s">
<t>1</t>
</c>
Where the is referencing a sharedString.xml file elsewhere.
So my question is, is it possible to put the text content directly inside the tags? Like so:
<c>
<text>ABC</text>
</c>
Or do I always need to reference an external shared strings xml file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它位于子文件“xl/sharedStrings.xml”中。 “t”元素内的值是“xl/sharedStrings.xml”中“si”元素的索引(第一个索引为 0)。
是的,像这样:
It is in the subfile "xl/sharedStrings.xml". The value inside the "t" element is the index of the "si" element in "xl/sharedStrings.xml" (first index is 0).
Yes, like this: