c# - excel单元格格式

标签 c# excel

如何以编程方式将单元格格式更改为 Excel 中的文本?

最佳答案

您可以使用:

Range("A1").NumberFormat = "@"

文字

Range("A1").NumberFormat = "dd/mm/yyyy hh:mm:ss" 

约会。

Range("A1").NumberFormat = "#,###"

为了钱等

关于c# - excel单元格格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1292812/

相关文章:

c# - MVC4 可扩展插件架构

c# - 检查组合框 : How to prevent a combobox from closing after a selection is clicked?

c# - 结构图 IContainer 实现

python - Excel 文件对比 Pandas 中的 read_excel

excel - 在每个单元格数据的末尾添加 "to the start and "

vba - 自动超链接提取的文件

c# - .NET 核心与 MySQL

c# - 如何从用户控件的依赖属性中设置/获取值?

vba - 如果今天的日期在到期日的四天内,请发送电子邮件

excel - 在 Excel 中使用大于条件后插入值