简体   繁体   中英

Microsoft Excel added special character in CSV file

I have.xlxs and.csv file of same content with text - Valbuena 5.° The problem is when I open.csv file in Micrsoft Excel, it add one special character like - Valbuena 5.°

I am creating both file in Java with UTF_8 character set.

Any solution will be appciciable.

Regards

I guess the encoding is correct and the problem isn't your code.

The fact is Excel isn't encoding in UTF-8 by default. If you want to retrieve your encoding, you must

  1. Open excel (new file)
  2. Data menu
  3. From text
  4. Select your file, choose UTF-8 encoding and you will see the right text

The best solution is to change your default excel encoding, i'm not sure if it's possible but I link a workaround: Is it possible to force Excel recognize UTF-8 CSV files automatically?

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