c#, Excel + csv: how to get the correct encoding?

前端 未结 7 1186
有刺的猬
有刺的猬 2020-12-20 12:12

I\'ve been trying this for quite a while now, but can\'t figure it out. I\'m trying to export data to Excel via a *.csv file. It works great so far, but I have some encodi

相关标签:
7条回答
  • 2020-12-20 12:54

    For my scenario using StreamWriter I found explicitly passing UTF8 encoding to the StreamWriter enabled excel to read the file using the correct encoding.

    See this answer for more details: https://stackoverflow.com/a/22306937/999048

    0 讨论(0)
提交回复
热议问题