我正在嘗試用 java 處理一個 csv 文件,但是在打印結果時,文本有太多空格。使用此代碼像上面的 img 一樣打印:FileInputStream fstream = new FileInputStream("prueba.csv");// or using ScanerDataInputStream in = new DataInputStream(fstream);BufferedReader br = new BufferedReader(new InputStreamReader(in));String strLine;//Read File Line By Linewhile ((strLine = br.readLine()) != null) { System.out.println(strLine);} }如果在例如 notapad++ 或 windows 記事本中打開文件,它看起來不錯。我試圖刪除空格,但也沒有成功:( 我能做什么?
添加回答
舉報
0/150
提交
取消