直接写用Excel打开时会乱码,需要加上下面代码中注释的三行
fos = new FileOutputStream(file, false); //fos.write( 0xef ); //fos.write( 0xbb ); //fos.write( 0xbf ); iowriter = new OutputStreamWriter(fos,"UTF-8"); writer = new CSVWriter(iowriter);
直接写用Excel打开时会乱码,需要加上下面代码中注释的三行
fos = new FileOutputStream(file, false); //fos.write( 0xef ); //fos.write( 0xbb ); //fos.write( 0xbf ); iowriter = new OutputStreamWriter(fos,"UTF-8"); writer = new CSVWriter(iowriter);