【问题标题】:How can I add symbols to a cell using closedxml?如何使用 closedxml 向单元格添加符号?
【发布时间】:2016-09-14 11:31:15
【问题描述】:

我正在将数据插入到虚拟 Excel 中。我需要在文本之前将符号附加到某个单元格中。 请让我知道如何使用 ClosedXML 实现这一目标。

【问题讨论】:

    标签: c# excel-2007 closedxml


    【解决方案1】:

    在 ClosedXML 中,您可以使用以下代码设置此值:

    ws.Cell(1, 1).Value = "❶ Symbol";
    

    要输入❶,可以使用Windows程序Character Map选择并复制相应的字符。

    【讨论】:

    • 您好 Francois Botha,我要求使用 ClosedXML 在 C# 中实现这一点。因此,如果您知道,请在 closedxml 中显示任何示例。
    • 非常感谢弗朗索瓦·博塔。它就像一个魅力。我之前尝试过,但无法从 excel 表插入符号区域复制这些字符。但是用于字符映射的 Windows 程序只是一个不错的工具。再次感谢。
    • 您好弗朗索瓦,我还有一个问题。如果也能回答这个问题,那对我有很大帮助。 stackoverflow.com/questions/39572289/…
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-07
    • 1970-01-01
    相关资源
    最近更新 更多