我需要将某些列的内容设置为会计格式。
尝试如下:
public static readonly string NUMBER_FORMAT_ACCOUNTING = "$";
. . .
bidPriceCell.Style.Numberformat.Format = NUMBER_FORMAT_ACCOUNTING;
...简单地给出了"$"和"-$"作为值。
这个尝试:
public static readonly string NUMBER_FORMAT_ACCOUNTING = "$0.00";
. . .
bidPriceCell.Style.Numberformat.Format = NUMBER_FORMAT_ACCOUNTING;
这段代码给出的值如"$24.09"和"-$0.91"
用户想要美元符号和数值之间有空格,并且负值用括号括起来,例如"$ 24.09"和"$ (0.91)"
我需要为Numberformat.Format属性分配哪个字符串才能实现这一点?