excel interop:NumberFormat#,## 0.000不显示预期结果

问题描述:

我开发了一个名为ExcelGenerator的C#实用程序类,它生成一个列表的对象列表。我想以这种格式显示双数字:3 288,523。

I developed a C# utility class called ExcelGenerator that generate a List of objects to excel. I want to display double numbers in this format : 3 288,523.

NumberFormat =#,## 0.000不显示预期结果

NumberFormat = "#,##0.000" doesn't display the expected result

这是方法:

public void FormatNombre(string frm)
{
_excel.Selection.NumberFormat = frm;
}

这是电话:

eg.FormatNombre(#,## 0.000);

eg.FormatNombre("#,##0.000");

数字仍然显示如下:3288,522.542

Number still displayed like this : 3288,522.542

你想格式化3288523.542到3 288,523?

You want to format 3288523.542 to 3 288,523?

尝试这样的一种:

[>999]#" "###","###;#

编辑:
只是注意到你正在尝试使用法语:尝试这种格式。

Just noticed looks like you are trying use French: Try this format.

# ##0,000