带逗号或分号的CSV? [英] CSV with comma or semicolon?

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

问题描述

如何建立一般的CSV档案?用逗号或分号?

How is a CSV file built in general? With commas or semicolons? Any advice on which one to use?

推荐答案

在Windows中,它依赖于区域和语言选项定制您在其中找到列表分隔符的屏幕。这是char应用程序期望作为CSV分隔符。

In Windows it is dependent on the "Regional and Language Options" customize screen where you find a List separator. This is the char Windows applications expect to be the CSV separator.

当然,这只在Windows应用程序中有效果,例如,如果文件未使用上述分隔符。所有使用Windows区域设置的应用程序都将有此行为。

Of course this only has effect in Windows applications, for example Excel will not automatically split data into columns if the file is not using the above mentioned separator. All applications that use Windows regional settings will have this behavior.

如果您正在为Windows编写程序,需要在其他应用程序中导入CSV,分隔符设置为,然后去它,否则我更喜欢; ,因为它导致较少的问题小数点,数字分组,并且不会出现在很多文本中。

If you are writing a program for Windows that will require importing the CSV in other applications and you know that the list separator set for your target machines is ,, then go for it, otherwise I prefer ; since it causes less problems with decimal points, digit grouping and does not appear in much text.

这篇关于带逗号或分号的CSV?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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