1

I want to open UTF-8 coded csv- or text-files directly in Excel 2016 or later. Of course I am aware of the import option, but I want to do this with a simple double-click.

Problem is that this way Excel will not show all UTF-8 characters - e.g. Cyrillic characters - correctly.

My OS is Windows 10.

1 Answer 1

1

The ways to achieve this that I can see are:

  • Prepend a Byte Order Mark (BOM) at the beginning of the file, preferably when the CSV file is created. The UTF-8 BOM is the hexadecimal byte sequence 0xEF,0xBB,0xBF.

  • For advanced users : Add a VBA macro to open the file as UTF-8 with the parameter Origin:=65001 for UTF-8.

You will find more details and flavors of the above in the post
Is it possible to force Excel recognize UTF-8 CSV files automatically?

3
  • Thanks! UTF-8 with BOM is no real option. All files come as UTF-8… Regarding a macro, could you please explain what exactly you mean. As I said, I want to open existing UTF-8 files in Excel by double-clicking on them. I found this: [link] (superuser.com/questions/1212741/…) But the script won't open Excel (PS set to unrestricted, also running script in PS won't open Excel) Can you help? Feb 16, 2022 at 16:44
  • And the [link] (stackoverflow.com/questions/6002256/…) doesn't help me either. I know those method of importing csv files. But that's too time consuming working with quite a number of csv files every day: Double-Click for me is the only option :-( Feb 16, 2022 at 16:46
  • The only double-click method I can see is to create a .bat file that copies the CSV, adding the UTF-8 BOM at its beginning and then open the file with Excel. Set this .bat as the handler of .csv files. Thus the double-click will open the copy.
    – harrymc
    Feb 16, 2022 at 16:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .