将 CSV 文件导入 Java
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9991128/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Importing a CSV File into Java
提问by Nick Welki
In the program I am writing, I want to be able to import CSV files. At the moment, it takes a basic text file in.
在我正在编写的程序中,我希望能够导入 CSV 文件。目前,它需要一个基本的文本文件。
File mainemails = new File ("mainemails.txt");
I know that for CSV imports using File is probably not the most time-efficient thing to use. What would be the most efficient way to import a CSV file? Would I have to download any new libraries to use an efficient method?
我知道使用 File 导入 CSV 可能不是最省时的方法。导入 CSV 文件的最有效方法是什么?我是否必须下载任何新库才能使用有效的方法?