带有阿拉伯字符的 CSV 文件在 Excel 中显示为符号 [英] CSV file with Arabic characters is displayed as symbols in Excel

查看:27
本文介绍了带有阿拉伯字符的 CSV 文件在 Excel 中显示为符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 python 从 twitter 中提取阿拉伯语推文并将其保存为 CSV 文件,但是当我在 excel 中打开保存的文件时,阿拉伯语显示为符号.但是,在python和记事本或word中,它看起来不错.我可以知道问题出在哪里吗?

I am using python to extract Arabic tweets from twitter and save it as a CSV file, but when I open the saved file in excel the Arabic language displays as symbols. However, inside python and notepad or word, it looks good. May I know where is the problem?

推荐答案

这是我在使用 Microsoft Excel 打开包含阿拉伯字符的 CSV 文件时经常遇到的问题.试试我在 Windows 和 MacOS 上最新版本的 Microsoft Excel 上测试的以下解决方法:

This is a problem I face frequently with Microsoft Excel when opening CSV files that contain Arabic characters. Try the following workaround that I tested on latest versions of Microsoft Excel on both Windows and MacOS:

  1. 在空白工作簿上打开 Excel

数据标签中,点击来自文本按钮(如果没有激活,确保选择了一个空单元格)

Within the Data tab, click on From Text button (if not activated, make sure an empty cell is selected)

浏览并选择 CSV 文件

在文本导入向导中,将 File_origin 更改为Unicode (UTF-8)"

In the Text Import Wizard, change the File_origin to "Unicode (UTF-8)"

下一步,从分隔符中选择文件中使用的分隔符,例如逗号

Go next and from the Delimiters, select the delimiter used in your file e.g. comma

完成并选择导入数据的位置

阿拉伯字符应正确显示.

The Arabic characters should show correctly.

这篇关于带有阿拉伯字符的 CSV 文件在 Excel 中显示为符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆