Excel 转 CSV UTF8 编码 [英] Excel to CSV with UTF8 encoding

查看:32
本文介绍了Excel 转 CSV UTF8 编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Excel 文件,其中包含一些西班牙语字符(波浪号等),我需要将其转换为 CSV 文件以用作导入文件.但是,当我执行另存为 CSV 时,它会破坏不是 ASCII 字符的特殊"西班牙语字符.它似乎也使用左右引号和长破折号来做到这一点,这些似乎来自在 Mac 中创建 Excel 文件的原始用户.

I have an Excel file that has some Spanish characters (tildes, etc.) that I need to convert to a CSV file to use as an import file. However, when I do Save As CSV it mangles the "special" Spanish characters that aren't ASCII characters. It also seems to do this with the left and right quotes and long dashes that appear to be coming from the original user creating the Excel file in Mac.

由于 CSV 只是一个文本文件,我确定它可以处理 UTF8 编码,所以我猜这是一个 Excel 限制,但我正在寻找一种方法从 Excel 到 CSV 并保留非- ASCII 字符完好无损.

Since CSV is just a text file I'm sure it can handle a UTF8 encoding, so I'm guessing it is an Excel limitation, but I'm looking for a way to get from Excel to CSV and keep the non-ASCII characters intact.

推荐答案

一个简单的解决方法是使用 Google 电子表格.粘贴(仅当您有复杂公式时才使用值)或导入工作表,然后下载 CSV.我只是尝试了几个字符,效果很好.

A simple workaround is to use Google Spreadsheet. Paste (values only if you have complex formulas) or import the sheet then download CSV. I just tried a few characters and it works rather well.

注意:Google 表格在导入时确实有限制.请参阅此处.

NOTE: Google Sheets does have limitations when importing. See here.

注意:使用 Google 表格时请注意敏感数据.

NOTE: Be careful of sensitive data with Google Sheets.

另一种选择 - 基本上他们使用 VB 宏或插件强制保存为 UTF8.我还没有尝试过任何这些解决方案,但它们听起来很合理.

Another alternative - basically they use VB macro or addins to force the save as UTF8. I have not tried any of these solutions but they sound reasonable.

这篇关于Excel 转 CSV UTF8 编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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