[英]Open .csv file containing special characters in Excel
I have a system that exports a .csv file and some of the rows contain special box characters such that the data looks like this: 我有一个系统导出.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?
However, when I open the file in excel, Excel warps the box characters so that it ends up looking like this: 但是,当我在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?
The file is being saved as plain-text to the user's hard drive, and I can open it in a text editor and see the characters fine, so I know it's something happening when Excel reads in the data. 该文件以纯文本形式保存到用户的硬盘中,我可以在文本编辑器中打开它并查看字符,所以我知道当Excel读入数据时会发生这种情况。
Any thoughts? 有什么想法吗? How can I prevent this?
我怎么能阻止这个?
在PHP生成的CSV中,我使用utf8_decode()解决了相关列。
Import your csv file as shown in the link below in Excel 2007. Select appropriate Encoding as a result will show expected Data including Special characters. 导入您的csv文件,如Excel 2007中的链接所示。选择适当的编码,结果将显示包含特殊字符的预期数据。 http://www.howtogeek.com/howto/microsoft-office/import-text-into-excel-2007/
http://www.howtogeek.com/howto/microsoft-office/import-text-into-excel-2007/
Regards, Kuldeep Rathod 此致,Kuldeep Rathod
excel is probably trying to open the file using the wrong encoding; excel可能试图使用错误的编码打开文件; try opening the file from within Excel, and choose a different file encoding;
尝试从Excel中打开文件,并选择不同的文件编码; those are probably Unicode characters, and Excel is probably using iso-8859-15 to import.
那些可能是Unicode字符,Excel可能正在使用iso-8859-15导入。
Choose UTF if possible 如果可能,请选择UTF
HTH HTH
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.