Asp.net 导出到 csv 和文化

标签 asp.net csv export culture

我正在使用 Asp.net 将数据导出到 csv 文件,我需要从 System.Globalization.CultureInfo.CurrentCulture 知道是否应该使用“,”或“;”作为值分隔符。例如美国需要“,”,欧洲需要“;”。我如何从 CurrentCulture 中找出要使用哪一个?

谢谢!

最佳答案

System.Globalization.CultureInfo.CurrentCulture.TextInfo.ListSeparator

定义来自 msdn docs :

Gets or sets the string that separates items in a list.

关于Asp.net 导出到 csv 和文化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3998162/

相关文章:

ASP.Net 验证摘要导致页面跳转到顶部

c# - 连接数组中的字符串并包含它的索引 C#

php - 如何正确转义 CSV 中的双引号?

git - 做一个 "git export"(比如 "svn export")?

c# - 当 ListView 被禁用时,在 ListView 中启用分页。 ASP.NET C#

asp.net - 是否有一种更干净/更有效的方法来分割字符串以在 GridView 中使用?

python - 带有函数模板的 Boost::Python 类:如何从外部添加实例?

c++ - 将 C++ 应用程序从 dll 打包到 exe

asp.net - 如何使用Json发送数据并进入asp.net服务

read.csv 在读取具有大量列的 csv 文件时非常慢