ResultSet to CSV

By | 2021년 11월 29일
Table of Content

ResultSet to CSV

참조

    file.createNewFile();
    fileWriter = new FileWriter(file);
    writer = new CSVWriter(fileWriter);
CSVWriter csvWriter = new CSVWriter(new FileWriter("yourfile.csv"), '\t');
java.sql.ResultSet myResultSet = .... ;
csvWriter.writeAll(myResultSet, includeHeaders);

답글 남기기