ASP.NET Excel export encoding problem

前端 未结 6 1906
-上瘾入骨i
-上瘾入骨i 2020-11-27 03:44

I\'m doing some Excel Exports on the ASP.NET Site. Everything works except of the Encoding. When I open it in Excel, it looks like this:

Eingabe Koste

6条回答
  •  南笙
    南笙 (楼主)
    2020-11-27 04:19

    I got same problem with spanish characters and solved it with this line of code.

            response.ContentEncoding = System.Text.Encoding.Default ;
    

    hope this helps

提交回复
热议问题