[英].Net HttpResponseMessage csv File with special characters that excel can open
[英]Open .csv file containing special characters in Excel
我有一个系统导出.csv文件,一些行包含特殊的框字符,使得数据如下所示:
Please specify the primary type of opportunity which you’re proposing:
└─ Please specify what type of sport:
└─ What is this person’s vocation?
└── How long have they been in the industry?
但是,当我在Excel中打开文件时,Excel会对框中的字符进行扭曲,使其最终看起来像这样:
Please specify the primary type of opportunity which you’re proposing:
└─ Please specify what type of sport:
└─ What is this person’s vocation?
└── How long have they been in the industry?
该文件以纯文本形式保存到用户的硬盘中,我可以在文本编辑器中打开它并查看字符,所以我知道当Excel读入数据时会发生这种情况。
有什么想法吗? 我怎么能阻止这个?
在PHP生成的CSV中,我使用utf8_decode()解决了相关列。
导入您的csv文件,如Excel 2007中的链接所示。选择适当的编码,结果将显示包含特殊字符的预期数据。 http://www.howtogeek.com/howto/microsoft-office/import-text-into-excel-2007/
此致,Kuldeep Rathod
excel可能试图使用错误的编码打开文件; 尝试从Excel中打开文件,并选择不同的文件编码; 那些可能是Unicode字符,Excel可能正在使用iso-8859-15导入。
如果可能,请选择UTF
HTH
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.