简体   繁体   中英

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:

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:

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.

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. http://www.howtogeek.com/howto/microsoft-office/import-text-into-excel-2007/

Regards, Kuldeep Rathod

excel is probably trying to open the file using the wrong encoding; try opening the file from within Excel, and choose a different file encoding; those are probably Unicode characters, and Excel is probably using iso-8859-15 to import.

Choose UTF if possible

HTH

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM