Convert decimal separator from ',' (comma) to '.' (dot) e.g. “7,5” to “7.5”

邮差的信 提交于 2019-12-02 05:58:53

If this is purely for display purposes then you can use custom format strings on the cells. Then your users can continue to use their localization settings that they are used to for inputting numbers. I think that changing localization settings would be a bad idea, as then your client may enter numbers incorrectly.

This is the general way of formatting numbers using custom format strings.

╔═════════════╦══════════════════════════╦═══════════════╗
║ To display  ║            As            ║ Use this code ║
╠═════════════╬══════════════════════════╬═══════════════╣
║ 1234.59     ║ 1234.6                   ║ ####.#        ║
║             ║                          ║               ║
║ 8.9         ║ 8.9                      ║ #.000         ║
║             ║                          ║               ║
║ 0.631       ║ 0.6                      ║ 0.#           ║
║             ║                          ║               ║
║ 12          ║ 12                       ║ #.0#          ║
║             ║                          ║               ║
║ 1234.568    ║ 1234.57                  ║ #.0#          ║
║             ║                          ║               ║
║ 44.398      ║   44.398                 ║ ???.???       ║
║ 102.65      ║ 102.65                   ║ ???.???       ║
║ 2.8         ║     2.8                  ║ ???.???       ║
║             ║ (with aligned decimals)  ║               ║
║             ║                          ║               ║
║ 5.25        ║ 5 1/4                    ║ # ???/???     ║
║ 5.3         ║ 5  3/10                  ║ # ???/???     ║
║             ║ (with aligned fractions) ║ # ???/???     ║
╚═════════════╩══════════════════════════╩═══════════════╝

And here is a link to the Microsoft information on regional format strings

(updated link 11-aug-2016)

https://support.office.com/en-gb/article/Create-or-delete-a-custom-number-format-78f2a361-936b-4c03-8772-09fab54be7f4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!