Search code examples
pythonexcelscrapylibreoffice

Is there any way to open a csv file that contains arabic, in excel sheet?


I have created a csv file using python, that contains Arabic lines I scraped from a website and its showing as it is in ubuntu libreoffice. But when I try to open it in MS Excel it shows garbage values

Libreoffice (Perfectly allright)

س کی مثال بیج کی سی

Excel (Garbage Values)

 عمران ظÙر Ûرن Ù¾Ù

Is there any way of getting same value as of Libreoffice in excel?


Solution

  • This is from https://help.livehelpnow.net/1/article/45188/viewing-exported-csv-files-containing-arabic-characters

    1. Save the exported file as a csv
    2. Open Excel
    3. Import the data using Data-->Import External Data --> Import Data
    4. Select the file type of "csv" and browse to your file
    4. In the import wizard change the File_Origin to "65001 UTF" (or choose correct language character identifier)
    5. Change the Delimiter to comma
    6. Select where to import to and Finish