How to set character encoding when opening Excel

86

20

Is it possible to set the default encoding for Excel (any version, e.g. 2010) when opening files like csv files (like you can in Open Office Calc)?

I When I try to open a csv file encoded in Japanese SHIFT-JIS, it opens but with mojibake (corrupted characters). In Open Office Calc, if you click on a csv file with a non-standard encoding like SHIFT-JIS, it automatically opens a dialog where you can set the encoding.

lozzer

Posted 2011-05-08T02:42:23.303

Reputation: 993

Which version of Excel? – paulmorriss – 2011-05-09T09:26:02.107

2003 or 2010 (I skipped 2007) – lozzer – 2011-05-10T17:49:05.933

Answers

82

Use the import function under "Data" tab where Excel allows us to specify the encoding. Select "from text" and choose your csv file then Select Japanese shift-jis encoding.

prp

Posted 2011-05-08T02:42:23.303

Reputation: 852

2Works also in Excel 2016 – Korayem – 2015-12-02T12:53:21.637

Note that excel calls the file encoding "File origin:" and is set to "Macintosh" on Excel for Mac. This can be a bit misleading if you don't know what to look for. It's on first step of the import wizard – Patrick – 2016-02-22T16:44:39.263

1On Excel 2016 for Mac: first open blank worksheet, next in main menu go to "Data" -> "Get External Data" -> "Import Text File". – DaddyM – 2016-06-06T11:42:14.583

6Downvoted, because using the import function (or text into columns assistant) means line breaks within cells will be messed up (this is broken in Excel ever since). It will wrap the next line into a new row and therefore trash the entire data layout below. – CodeManX – 2017-01-18T21:30:19.880

2Also not an answer to setting a character encoding when directly opening a csv file in Excel. The whole point of setting the encoding is to eliminate these repetitive and annoying required steps. – Aaron Bramson – 2018-09-18T09:27:38.033

Just me or does the wizard never show? Nothing happens. And first, I can't believe MS Excel does not support UTF8 out of the box. It's 2019??? – Jonny – 2019-03-22T08:55:51.193

works perfectly for xl2007 and xl2010 – SooDesuNe – 2012-04-27T15:05:05.327

Sorry, I didn't check back until now. The "Data"->"From Text" approach works fine with xl2007 and xl2010. Not obvious but it works. – lozzer – 2013-04-22T17:22:55.870

8

The following steps work with Office 2003.

  1. Rename .csv to .txt
  2. Open .txt file from Excel (don't do it with right click on file then open with Excel), Excel will open a Text Import Wizard dialog, ask ask for the format of .txt file, including character encoding of text file.
  3. Rename .txt back to .csv after your edit is finished.

LiuYan 刘研

Posted 2011-05-08T02:42:23.303

Reputation: 1 929

4

On Excel 2016 for Mac:

  1. create blank worksheet,
  2. in main menu go to Data -> Get External Data -> Import Text File,
  3. follow steps in wizard - choose the encoding until you will see the correct preview and on the next step choose columns delimiter (delimiters differ from csv to csv files).

DaddyM

Posted 2011-05-08T02:42:23.303

Reputation: 141

2

See if this helps (MS Excel 2007 and above).

  1. Open Excel and click the Microsoft Orb at the top and then click on Excel Options.

  2. Go to Advanced, and then look for the Web Options button. It should be under General.

  3. Go to the Encoding tab and pick Japanese Shift-JIS from the drop-down menu. Click Ok, restart Excel and try to open your file.

Ellesa

Posted 2011-05-08T02:42:23.303

Reputation: 9 729

1This should work for saving, but not for opening. I am wondering if it actually makes sense to choose an encoding when opening a file. Would this fix the issue ? – Veverke – 2015-05-12T14:05:34.913

3This didn't work. My system is a Japanese system and so SHIFT-JIS is already set here as the default. But, I have my default editing language set for English (with Japanese also added). If I set the default editing language to Japanese, then the SHIFT-JIS csv file will open correctly. But this is messy. What if the file was some other encoding (e.g. Korean, Chinese)? What I really need is a place to set the encoding of the file (like I can in Open Office Calc). – lozzer – 2011-05-10T18:12:00.720

1

Lozzer provided great feedback in the small print: "If I set the default editing language to Japanese, then the SHIFT-JIS csv file will open correctly...."

I have spent hours looking for a solution on how to open Japanese CSV with one simple click We have a multi-language environment (En-Jp).

Even though Excel showed Japanese menus (based on the control panels language settings), the default editing setting in File > Options > Language > Choose Editing Language (Top area) remained English. Changing that to Japanese (obviously no issue for Japanese users) solved our problem.

Matty

Posted 2011-05-08T02:42:23.303

Reputation: 11