gpt4 book ai didi

c# - 如何使用 epplus 在 excel 中将小数格式化为百分比?

转载 作者:太空狗 更新时间:2023-10-29 18:35:17 26 4
gpt4 key购买 nike

我使用以下代码在 excel 中使用 Epplus 将小数格式化为百分比。我用过这个example .

sheet.Cells["B:B"].Style.Numberformat.Format = "#0\\.00%";

数字在工作表中看起来很正常,但在编辑栏中数字看起来不同。

数字 9.47% 在编辑栏中显示为 947。

检查问题样本的图像。如何解决?

enter image description here

最佳答案

简答:将数字除以 100 并使用以下自定义格式 0.00%

关于c# - 如何使用 epplus 在 excel 中将小数格式化为百分比?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30012596/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com