This is done to ensure that our users can work with the CSVs on a variety of operating systems using a variety of programs.However, you may have run into an issue with importing the CSV into Excel if your results contains accented characters (such as,,, etc) used in many different languages.
CSV means Comma Separated Values but for example on a german Windows by default semicolon must be used as separator while comma does not work. (Here it should be named SSV Semicolon Separated Values) CSV files cannot be interchanged between different language versions of Windows. The application always uses UTF-8 because of its multilingual nature at all levels. Excel Does Not Import Foreign Language Accents How To Force ExcelAnd I dont know how to force Excel understand that the open CSV file is encoded in UTF-8. I also tried specifying UTF-8 BOM EF BB BF, but Excel ignores that. When I was asking this question, I asked for a way of opening a UTF-8 CSV file in Excel without any problems for a user, in a fluent and transparent way. However, I used a wrong formulation asking for doing it automatically. That is very confusing and it clashes with VBA macro automation. There are two answers for this questions that I appreciate the most: the very first answer by Alex, and Ive accepted this answer; and the second one by Mark that have appeared a little later. From the usability point of view, Excel seemed to have lack of a good user-friendly UTF-8 CSV support, so I consider both answers are correct, and I have accepted Alexs answer first because it really stated that Excel was not able to do that transparently. Marks answer promotes a more complicated way for more advanced users to achieve the expected result. Both answers are great, but Alexs one fits my not clearly specified question a little better. ![]() Ive accepted alexs answer more than 2 years ago (Q and A both on May 14), and then Mark answered suggesting a tricky workaround (I actually didnt check it) that surprisingly scored scored more points at my question that surprisingly became popular as well. We actually refused Excel support in my project long time ago, and I dont want to take away alexs reputation score, because Excel seemed, and probably still seems (please correct me if Im wrong), to mishandle CSV. No explanation was given, but if you have enough reputation you can still see it. You need to use streams (or use a workaround ) to get the BOM to output. Same can be seen when opening the file in notepad and saving right back down using the UTF-8 option. I found it worthwhile to add this answer, and evidently a number of other people have found it useful too. At any rate, it seems like a better answer than saying not to use CSV, or instructing users how to open the file in some bizarre way. I had same problem with Cyrillic letters, but adding BOM character uFEFF did help. The way Excel reads BOM screws up the advantage of UTF-8 over Unicode, which is backwards compatibility with ASCII. Adding the BOM will make Excel work, but break other proper UTF-8ASCII file reads. Excel Does Not Import Foreign Language Accents Manual Will ApplyApart from that: this manual will apply to one Excel version but other Excel versions have different menus and configuration dialogs. This format is implemented so stupidly by Microsoft that it depends on the region settings in control panel if comma or semicolon is used as separator. So the same CSV file may open correctly on one computer but on anther computer not. CSV means Comma Separated Values but for example on a german Windows by default semicolon must be used as separator while comma does not work. Here it should be named SSV Semicolon Separated Values) CSV files cannot be interchanged between different language versions of Windows.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |