Skip to content

Instantly share code, notes, and snippets.

@shigemk2
Created June 8, 2015 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shigemk2/6390ecb9a7409fedb7e8 to your computer and use it in GitHub Desktop.
Save shigemk2/6390ecb9a7409fedb7e8 to your computer and use it in GitHub Desktop.
import java.io.*;
import jp.ossc.nimbus.io.CSVWriter;
class Nimbus {
public static void main(String[] args) {
try {
FileOutputStream fos = new FileOutputStream("sample.csv");
OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF-8");
CSVWriter writer = new CSVWriter(osw);
String[] csv = new String[2];
csv[0] = "hoge";
csv[1] = "100";
writer.writeCSV(csv);
writer.close();
} catch (IOException e) {
} finally {
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment