使用 DocumentFormat.OpenXml.Spreadsheet
中的 Open XML for Excel,如何仅将部分文本设置为粗体?
var cell = new Cell {
//DataType = CellValues.InlineString,
CellReference = "A" + 1
};
// TODO: Set "bold text" to bold style
//var inlineString = new InlineString();
//inlineString.AppendChild(new Text { Text = "Normal text... bold text..." });
//cell.AppendChild(inlineString);
这段代码已经被注释掉了,但现在正在使用,需要进行修改或者可能需要进行修改。
InlineString
可能也有两个运行,参见 https://dev59.com/NVkS5IYBdhLWcg3wcGaW#39853844。 - xmedeko