Excel编号格式 [英] Excel Number Format

查看:110
本文介绍了Excel编号格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我试图以编程方式在excel单元格中输入数字.我的C#程序中有数字格式代码.结果,数字具有不同的小数位.例如12.1200、2.000、100.0等.

当我在excel中打印这些值时,它将更改小数位数.如何确保我的数字与打印时的小数位相同.我不想将单元格从数字更改为文本.

Hi,

I am trying to enter numbers in excel cells programatically. I have number formatting code in side my c# program. As a result numbers have differnt decimal places. e.g 12.1200, 2.000, 100.0 etc.

When I print these values in excel, it changes the number of decimal places. How do I ensure that my numbers have same decimal places as I print then. I do not want to change the cells from number to text.

推荐答案

我认为您需要为每个单元格设置数字格式. Microsoft在此处 [
I think you need to set the number format for each cell. Microsoft has a piece of sample code here[^].


这篇关于Excel编号格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆