Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有内联格式的 excel 表 - 例如,单元格中只有一个单词是粗体的。当我读取单元格值时,我得到一个纯文本 BSTR。我怎样才能得到格式?
我在 AX 中执行此操作,但我想这与 C# 或使用 Excel 互操作库的任何其他内容相同。
谢谢
你想要Characters单元格的属性。引用为 expression.Characters(Start, Length)
Characters
expression.Characters(Start, Length)
例如Range("A1").Characters(3,1).Font.Bold将判断第三个字符是否为粗体
Range("A1").Characters(3,1).Font.Bold