我正在从java读取CSV文件并插入数据库mysql,同时读取csv文件我用引号引入数据但我想读取没有引号的数据可以任何人帮助我... ..!
" 03_lab3_lsi1_kw"," 06-02-2017 12:02:13",7243.732,1,42772501540.0694
这是我的代码:
target
答案 0 :(得分:0)
String s = "your input string";
s = s.replaceAll(“\”“,”“);
答案 1 :(得分:0)
使用OpenCSV(.jar)CsvFileReader从csv文件中读取数据
CSVReader csvfile = new CSVReader("FilePath\\.csv");
String[] csvdata = csvfile.readnext(); // To read the row one by one
// Read all row from csv
List<String[]> csvdata1 = csvfile.readAll(); //To Read all data from csv file
String[] csvdata = csvdata1.get(0);//Read first row