+ Reply to Thread
Results 1 to 4 of 4

Save as csv with UTF-8 encoding

  1. #1
    Forum Contributor
    Join Date
    04-30-2010
    Location
    Denmark
    MS-Off Ver
    Office 365
    Posts
    215

    Save as csv with UTF-8 encoding

    Hello!

    I have to export some some sheets from excel as *.csv with UTF-8 encoding and afterwards import them in another program.

    The problem is, that no matter how I do it, I cant seem to make the proper UTF-8 encoding work from Excel. So every time I export the files from Excel, I have to open them in notepad++ (or a different text editor) afterwards, and then choose to convert the encoding to UTF-8 and save the files again. Then the csv files end up beign properly UTF-8 encoded.

    I found some very old threads about this, but no proper solutions seems to be introduced in those threads.

    Can it be right that it is still not possible to do this in Excel, without involving another text editor afterwards?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Save as csv with UTF-8 encoding

    I've not tried this, but it appears possible.

    File > Save As, Save as type: *.csv, Tools > Web Options > Encoding, follow your nose from there.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    04-30-2010
    Location
    Denmark
    MS-Off Ver
    Office 365
    Posts
    215

    Re: Save as csv with UTF-8 encoding

    That is what im doing, but for some reason, Excel does not properly encode it as UTF-8.

    I can show it this way:
    I have this original Excel file Original.xlsx, its looks like this:
    savedfromexcel_utf8_screen.png

    Then I save that file as CSV UTF-8 and also choose the UTF-8 under Tools -> Encoding:
    savedfromexcel_utf8.png

    If I open that csv file again in Excel it still looks like this:
    savedfromexcel_utf8_screen.png

    But that is not the proper UTF-8 encoding, and I then have to open it Notepad++ and then convert the encoding (again) to UTF-8, like this:
    savedfromexcel_utf8_notepad.png

    If I open the file again in excel after having run it though notepad++, then looks like this, and that is the format im after:
    savedfromexcel_utf8_notepad_screen.png

    But I cant seem to do it correct from Excel in the first place.

    I also tried with a bunch of different VBA variations, like FileFormat:=xlCSV, xlCSVUTF8, xlCSVMSDOS etc., but with no success.

    Tried to also add the 2 converted csv files, but I guess there is a limit of 5 files/screenshots per post, which means I cant attach those to this post.
    Attached Files Attached Files
    Last edited by Imbizile; 03-10-2019 at 04:59 AM.

  4. #4
    Forum Contributor
    Join Date
    04-30-2010
    Location
    Denmark
    MS-Off Ver
    Office 365
    Posts
    215

    Re: Save as csv with UTF-8 encoding

    The 2 missing files are attached in this post:
    savedfromexcel_utf8.csv
    savedfromexcel_utf8_notepad_converted.csv
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. UTF-8 encoding
    By peter.lenkei in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-26-2018, 04:18 PM
  2. save csv with utf-8 encoding
    By sourabhcsp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-27-2014, 10:23 AM
  3. Replies: 1
    Last Post: 05-23-2014, 05:44 AM
  4. [SOLVED] UTF-8.0 encoding
    By bob808a in forum Excel General
    Replies: 6
    Last Post: 06-14-2012, 08:01 AM
  5. Using ADO to save as UTF-8 encoding
    By dntel123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-13-2011, 07:18 AM
  6. XML encoding
    By InfoGet in forum Excel General
    Replies: 0
    Last Post: 04-07-2008, 10:58 AM
  7. [SOLVED] UTF-8 encoding CSV
    By [email protected] in forum Excel General
    Replies: 0
    Last Post: 04-03-2006, 09:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1