如何使用UTF-16格式将Excel文件保存为csv [英] How to save Excel file as csv with UTF-16 formatting

查看:1061
本文介绍了如何使用UTF-16格式将Excel文件保存为csv的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到Excel的问题,无法正常储存我的档案。我有一个数据列表,组织成三列:String String INt。

I am having an issue with Excel not saving my files properly. I have a list of data which is organized into three columns: String String INt.

我想把这个文件读入Java程序来执行一些计算。 Excel导出为.csv文件导致我失去重要的数据作为原生的UTF-8编码的结果。我可以将其保存为UTF-16 .txt文件,但是,我得到另一个恼人的结果。如果我在每个字段字段之间插入逗号的列,它保存逗号和引号周围的逗号!我已经看到了这个问题的一些解决方案,但他们不保留UTF-16编码。

I want to read this file into a Java program to perform some calculations. Excel exporting as a .csv file causes me to lose significant data as a result of the native UTF-8 encoding. I can save it as a UTF-16 .txt file however, I get another annoying result. If i insert columns of commas between each field field it saves the commas with quotes around it! I have seen some solutions to this problem but they do not preserve the UTF-16 encoding.

任何帮助将非常感激。

推荐答案


  1. 在excel中将文件另存为CSV(逗号分隔)

  2. 在notepad ++中打开保存的CSV文件

  3. 编码 - >转换tO UCS-2 Big Endian

完成。

这篇关于如何使用UTF-16格式将Excel文件保存为csv的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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